{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 导入包"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import warnings\n",
    "\n",
    "import time\n",
    "\n",
    "import matplotlib.pyplot as plt\n",
    "import seaborn as sns\n",
    "\n",
    "import datetime\n",
    "\n",
    "from pprint import pprint as pprint\n",
    "\n",
    "from scipy.interpolate import interp1d\n",
    "\n",
    "import math\n",
    "\n",
    "%matplotlib inline\n",
    "\n",
    "warnings.filterwarnings(\"ignore\")\n",
    "pd.set_option('display.max_columns', None)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 数据导入\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>保单号</th>\n",
       "      <th>起保日期</th>\n",
       "      <th>终止日期</th>\n",
       "      <th>渠道</th>\n",
       "      <th>品牌</th>\n",
       "      <th>车系</th>\n",
       "      <th>保单性质</th>\n",
       "      <th>续保年</th>\n",
       "      <th>投保类别</th>\n",
       "      <th>是否本省车牌</th>\n",
       "      <th>使用性质</th>\n",
       "      <th>车辆种类</th>\n",
       "      <th>车辆用途</th>\n",
       "      <th>新车购置价</th>\n",
       "      <th>车龄</th>\n",
       "      <th>险种</th>\n",
       "      <th>NCD</th>\n",
       "      <th>风险类别（A最低，E最高）</th>\n",
       "      <th>客户类别</th>\n",
       "      <th>被保险人性别</th>\n",
       "      <th>被保险人年龄</th>\n",
       "      <th>是否投保车损</th>\n",
       "      <th>是否投保盗抢</th>\n",
       "      <th>是否投保车上人员</th>\n",
       "      <th>三者险保额</th>\n",
       "      <th>签单保费</th>\n",
       "      <th>立案件数</th>\n",
       "      <th>已决赔款</th>\n",
       "      <th>是否续保</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>2018-02-17 00:00:00</td>\n",
       "      <td>2019-02-16 00:00:00</td>\n",
       "      <td>电网销</td>\n",
       "      <td>上汽通用别克</td>\n",
       "      <td>英朗</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>交商全保</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座以下客车</td>\n",
       "      <td>100900</td>\n",
       "      <td>1</td>\n",
       "      <td>商业险</td>\n",
       "      <td>c.过去一年未出险</td>\n",
       "      <td>C</td>\n",
       "      <td>个人</td>\n",
       "      <td>F</td>\n",
       "      <td>27.0</td>\n",
       "      <td>投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>500000.0</td>\n",
       "      <td>2264.60</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>2018-05-11 00:00:00</td>\n",
       "      <td>2019-05-10 00:00:00</td>\n",
       "      <td>个人代理</td>\n",
       "      <td>一汽大众</td>\n",
       "      <td>迈腾</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>交商全保</td>\n",
       "      <td>是</td>\n",
       "      <td>企业非营业用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座及9座以下非营运客车(含越野)</td>\n",
       "      <td>191800</td>\n",
       "      <td>1</td>\n",
       "      <td>交强险</td>\n",
       "      <td>3.上年未发生有责事故</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>F</td>\n",
       "      <td>36.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>NaN</td>\n",
       "      <td>849.06</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>2018-05-04 00:00:00</td>\n",
       "      <td>2019-05-03 00:00:00</td>\n",
       "      <td>个人代理</td>\n",
       "      <td>四川一汽丰田</td>\n",
       "      <td>四川一汽丰田RAV4</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>交商全保</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座及9座以下非营运客车(含越野)</td>\n",
       "      <td>200800</td>\n",
       "      <td>2</td>\n",
       "      <td>交强险</td>\n",
       "      <td>2.连续2年无事故</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>F</td>\n",
       "      <td>46.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>NaN</td>\n",
       "      <td>716.98</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>2018-06-03 00:00:00</td>\n",
       "      <td>2019-06-02 00:00:00</td>\n",
       "      <td>交叉销售</td>\n",
       "      <td>长安</td>\n",
       "      <td>悦翔V5</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>单商业</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座以下客车</td>\n",
       "      <td>56900</td>\n",
       "      <td>4</td>\n",
       "      <td>商业险</td>\n",
       "      <td>c.过去一年未出险</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>28.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>500000.0</td>\n",
       "      <td>1011.75</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>2018-10-17 00:00:00</td>\n",
       "      <td>2019-10-16 00:00:00</td>\n",
       "      <td>车商渠道</td>\n",
       "      <td>北京现代</td>\n",
       "      <td>伊兰特</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>单交强</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座及9座以下非营运客车(含越野)</td>\n",
       "      <td>81600</td>\n",
       "      <td>14</td>\n",
       "      <td>交强险</td>\n",
       "      <td>2.连续2年无事故</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>49.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>NaN</td>\n",
       "      <td>716.98</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>6</td>\n",
       "      <td>2018-09-29 00:00:00</td>\n",
       "      <td>2019-09-28 00:00:00</td>\n",
       "      <td>电网销</td>\n",
       "      <td>宝马</td>\n",
       "      <td>宝马X3</td>\n",
       "      <td>续保</td>\n",
       "      <td>8</td>\n",
       "      <td>交商全保</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座以下客车</td>\n",
       "      <td>665000</td>\n",
       "      <td>11</td>\n",
       "      <td>商业险</td>\n",
       "      <td>f.上年出险一次</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>F</td>\n",
       "      <td>42.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>500000.0</td>\n",
       "      <td>1190.29</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>7</td>\n",
       "      <td>2018-11-13 00:00:00</td>\n",
       "      <td>2019-11-12 00:00:00</td>\n",
       "      <td>电网销</td>\n",
       "      <td>力帆(乘用车)</td>\n",
       "      <td>力帆320</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>交商全保</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座以下客车</td>\n",
       "      <td>32500</td>\n",
       "      <td>5</td>\n",
       "      <td>商业险</td>\n",
       "      <td>b.过去两年未出险</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>41.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>500000.0</td>\n",
       "      <td>833.21</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>8</td>\n",
       "      <td>2017-04-28 00:00:00</td>\n",
       "      <td>2018-04-27 00:00:00</td>\n",
       "      <td>普通兼代(含银行代理)</td>\n",
       "      <td>夏利</td>\n",
       "      <td>夏利</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>单交强</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座及9座以下非营运客车(含越野)</td>\n",
       "      <td>29800</td>\n",
       "      <td>7</td>\n",
       "      <td>交强险</td>\n",
       "      <td>1.连续3+无事故</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>47.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>NaN</td>\n",
       "      <td>627.36</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>9</td>\n",
       "      <td>2017-07-07 00:00:00</td>\n",
       "      <td>2018-07-06 00:00:00</td>\n",
       "      <td>个人代理</td>\n",
       "      <td>别克</td>\n",
       "      <td>昂科雷ENCLAVE</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>交商全保</td>\n",
       "      <td>是</td>\n",
       "      <td>企业非营业用车</td>\n",
       "      <td>6座及10座以下客车</td>\n",
       "      <td>9座及9座以下非营运客车(含越野)</td>\n",
       "      <td>429000</td>\n",
       "      <td>6</td>\n",
       "      <td>交强险</td>\n",
       "      <td>4.上年发生一次有责不涉及死亡的事故</td>\n",
       "      <td>NaN</td>\n",
       "      <td>机构</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1066.04</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>10</td>\n",
       "      <td>2016-02-15 00:00:00</td>\n",
       "      <td>2017-02-14 00:00:00</td>\n",
       "      <td>专业中介</td>\n",
       "      <td>上海通用雪佛兰</td>\n",
       "      <td>科鲁兹</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>单交强</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座及9座以下非营运客车(含越野)</td>\n",
       "      <td>116900</td>\n",
       "      <td>3</td>\n",
       "      <td>交强险</td>\n",
       "      <td>4.上年发生一次有责不涉及死亡的事故</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>26.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>NaN</td>\n",
       "      <td>950.00</td>\n",
       "      <td>1</td>\n",
       "      <td>744.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>11</td>\n",
       "      <td>2018-10-27 00:00:00</td>\n",
       "      <td>2019-10-26 00:00:00</td>\n",
       "      <td>电网销</td>\n",
       "      <td>长安福特</td>\n",
       "      <td>福克斯</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>单商业</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座以下客车</td>\n",
       "      <td>102900</td>\n",
       "      <td>8</td>\n",
       "      <td>商业险</td>\n",
       "      <td>e.新过户</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>21.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>500000.0</td>\n",
       "      <td>1190.29</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>12</td>\n",
       "      <td>2018-12-07 00:00:00</td>\n",
       "      <td>2019-12-06 00:00:00</td>\n",
       "      <td>专业中介</td>\n",
       "      <td>上汽通用五菱</td>\n",
       "      <td>五菱之光/五菱扬光</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>单交强</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座及10座以下客车</td>\n",
       "      <td>9座及9座以下非营运客车(含越野)</td>\n",
       "      <td>29000</td>\n",
       "      <td>7</td>\n",
       "      <td>交强险</td>\n",
       "      <td>1.连续3+无事故</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>32.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>NaN</td>\n",
       "      <td>726.42</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>13</td>\n",
       "      <td>2018-10-14 00:00:00</td>\n",
       "      <td>2019-10-13 00:00:00</td>\n",
       "      <td>车商渠道</td>\n",
       "      <td>一汽奥迪</td>\n",
       "      <td>一汽奥迪Q5</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>交商全保</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座以下客车</td>\n",
       "      <td>345240</td>\n",
       "      <td>5</td>\n",
       "      <td>商业险</td>\n",
       "      <td>g.上年出险二次</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>F</td>\n",
       "      <td>44.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>500000.0</td>\n",
       "      <td>1487.86</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>14</td>\n",
       "      <td>2018-07-25 00:00:00</td>\n",
       "      <td>2019-07-24 00:00:00</td>\n",
       "      <td>个人代理</td>\n",
       "      <td>北京现代</td>\n",
       "      <td>途胜</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>单交强</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座及9座以下非营运客车(含越野)</td>\n",
       "      <td>120800</td>\n",
       "      <td>9</td>\n",
       "      <td>交强险</td>\n",
       "      <td>1.连续3+无事故</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>56.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>NaN</td>\n",
       "      <td>627.36</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>15</td>\n",
       "      <td>2018-11-20 00:00:00</td>\n",
       "      <td>2019-11-19 00:00:00</td>\n",
       "      <td>个人代理</td>\n",
       "      <td>东风风行</td>\n",
       "      <td>风行SX6</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>单交强</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座及10座以下客车</td>\n",
       "      <td>9座及9座以下非营运客车(含越野)</td>\n",
       "      <td>69900</td>\n",
       "      <td>2</td>\n",
       "      <td>交强险</td>\n",
       "      <td>2.连续2年无事故</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>F</td>\n",
       "      <td>41.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>NaN</td>\n",
       "      <td>830.19</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>16</td>\n",
       "      <td>2017-07-15 00:00:00</td>\n",
       "      <td>2018-07-14 00:00:00</td>\n",
       "      <td>电网销</td>\n",
       "      <td>哈弗</td>\n",
       "      <td>哈弗H1</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>交商全保</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座及9座以下非营运客车(含越野)</td>\n",
       "      <td>59900</td>\n",
       "      <td>2</td>\n",
       "      <td>交强险</td>\n",
       "      <td>2.连续2年无事故</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>55.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>NaN</td>\n",
       "      <td>716.98</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>17</td>\n",
       "      <td>2016-10-14 15:00:00</td>\n",
       "      <td>2017-10-13 15:00:00</td>\n",
       "      <td>个人代理</td>\n",
       "      <td>一汽大众</td>\n",
       "      <td>一汽大众CC</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>单交强</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座及9座以下非营运客车(含越野)</td>\n",
       "      <td>246800</td>\n",
       "      <td>6</td>\n",
       "      <td>交强险</td>\n",
       "      <td>4.上年发生一次有责不涉及死亡的事故</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>F</td>\n",
       "      <td>34.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>NaN</td>\n",
       "      <td>896.23</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>18</td>\n",
       "      <td>2018-06-30 00:00:00</td>\n",
       "      <td>2019-06-29 00:00:00</td>\n",
       "      <td>专业中介</td>\n",
       "      <td>一汽大众</td>\n",
       "      <td>宝来</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>单商业</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座以下客车</td>\n",
       "      <td>128300</td>\n",
       "      <td>5</td>\n",
       "      <td>商业险</td>\n",
       "      <td>e.新过户</td>\n",
       "      <td>B</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>23.0</td>\n",
       "      <td>投保车损</td>\n",
       "      <td>投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>1000000.0</td>\n",
       "      <td>3428.97</td>\n",
       "      <td>1</td>\n",
       "      <td>1273.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>19</td>\n",
       "      <td>2018-07-26 00:00:00</td>\n",
       "      <td>2019-07-25 00:00:00</td>\n",
       "      <td>电网销</td>\n",
       "      <td>长安福特</td>\n",
       "      <td>福睿斯</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>交商全保</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座及9座以下非营运客车(含越野)</td>\n",
       "      <td>82800</td>\n",
       "      <td>2</td>\n",
       "      <td>交强险</td>\n",
       "      <td>2.连续2年无事故</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>45.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>NaN</td>\n",
       "      <td>716.98</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>20</td>\n",
       "      <td>2018-07-28 00:00:00</td>\n",
       "      <td>2019-07-27 00:00:00</td>\n",
       "      <td>车商渠道</td>\n",
       "      <td>长城</td>\n",
       "      <td>风骏</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>交商全保</td>\n",
       "      <td>是</td>\n",
       "      <td>非营业货车</td>\n",
       "      <td>2吨以下货车</td>\n",
       "      <td>矿山作业用车</td>\n",
       "      <td>84800</td>\n",
       "      <td>1</td>\n",
       "      <td>交强险</td>\n",
       "      <td>4.上年发生一次有责不涉及死亡的事故</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>26.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1132.08</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>21</td>\n",
       "      <td>2018-07-11 13:00:00</td>\n",
       "      <td>2019-07-10 13:00:00</td>\n",
       "      <td>专业中介</td>\n",
       "      <td>江淮</td>\n",
       "      <td>瑞风</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>单交强</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座及10座以下客车</td>\n",
       "      <td>9座及9座以下非营运客车(含越野)</td>\n",
       "      <td>118000</td>\n",
       "      <td>4</td>\n",
       "      <td>交强险</td>\n",
       "      <td>4.上年发生一次有责不涉及死亡的事故</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>27.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1037.74</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>22</td>\n",
       "      <td>2017-04-20 00:00:00</td>\n",
       "      <td>2018-04-19 00:00:00</td>\n",
       "      <td>个人代理</td>\n",
       "      <td>长安福特</td>\n",
       "      <td>嘉年华</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>单交强</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座及9座以下非营运客车(含越野)</td>\n",
       "      <td>69600</td>\n",
       "      <td>13</td>\n",
       "      <td>交强险</td>\n",
       "      <td>2.连续2年无事故</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>36.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>NaN</td>\n",
       "      <td>716.98</td>\n",
       "      <td>1</td>\n",
       "      <td>500.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>23</td>\n",
       "      <td>2016-11-11 00:00:00</td>\n",
       "      <td>2017-11-10 00:00:00</td>\n",
       "      <td>车商渠道</td>\n",
       "      <td>上汽大众斯柯达</td>\n",
       "      <td>明锐</td>\n",
       "      <td>续保</td>\n",
       "      <td>1</td>\n",
       "      <td>交商全保</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座以下客车</td>\n",
       "      <td>95900</td>\n",
       "      <td>1</td>\n",
       "      <td>商业险</td>\n",
       "      <td>c.过去一年未出险</td>\n",
       "      <td>C</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>28.0</td>\n",
       "      <td>投保车损</td>\n",
       "      <td>投保盗抢</td>\n",
       "      <td>投保车上人员</td>\n",
       "      <td>500000.0</td>\n",
       "      <td>3597.03</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>24</td>\n",
       "      <td>2016-10-31 00:00:00</td>\n",
       "      <td>2017-10-30 00:00:00</td>\n",
       "      <td>车商渠道</td>\n",
       "      <td>沃尔沃</td>\n",
       "      <td>沃尔沃V40</td>\n",
       "      <td>续保</td>\n",
       "      <td>1</td>\n",
       "      <td>交商全保</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座以下客车</td>\n",
       "      <td>227900</td>\n",
       "      <td>1</td>\n",
       "      <td>商业险</td>\n",
       "      <td>b.过去两年未出险</td>\n",
       "      <td>C</td>\n",
       "      <td>个人</td>\n",
       "      <td>F</td>\n",
       "      <td>52.0</td>\n",
       "      <td>投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>300000.0</td>\n",
       "      <td>3367.47</td>\n",
       "      <td>1</td>\n",
       "      <td>9023.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>25</td>\n",
       "      <td>2017-03-19 00:00:00</td>\n",
       "      <td>2018-03-18 00:00:00</td>\n",
       "      <td>普通兼代(含银行代理)</td>\n",
       "      <td>一汽大众</td>\n",
       "      <td>捷达</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>交商全保</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座及9座以下非营运客车(含越野)</td>\n",
       "      <td>70800</td>\n",
       "      <td>8</td>\n",
       "      <td>交强险</td>\n",
       "      <td>1.连续3+无事故</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>34.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>NaN</td>\n",
       "      <td>627.36</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>26</td>\n",
       "      <td>2017-05-22 00:00:00</td>\n",
       "      <td>2018-05-21 00:00:00</td>\n",
       "      <td>车商渠道</td>\n",
       "      <td>四川一汽丰田</td>\n",
       "      <td>卡罗拉</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>交商全保</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座以下客车</td>\n",
       "      <td>122800</td>\n",
       "      <td>4</td>\n",
       "      <td>商业险</td>\n",
       "      <td>c.过去一年未出险</td>\n",
       "      <td>D</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>26.0</td>\n",
       "      <td>投保车损</td>\n",
       "      <td>投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>1000000.0</td>\n",
       "      <td>3498.70</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>27</td>\n",
       "      <td>2017-01-07 00:00:00</td>\n",
       "      <td>2018-01-06 00:00:00</td>\n",
       "      <td>电网销</td>\n",
       "      <td>长安马自达</td>\n",
       "      <td>长安马自达3</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>交商全保</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座以下客车</td>\n",
       "      <td>95800</td>\n",
       "      <td>4</td>\n",
       "      <td>商业险</td>\n",
       "      <td>c.过去一年未出险</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>32.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>500000.0</td>\n",
       "      <td>1146.65</td>\n",
       "      <td>1</td>\n",
       "      <td>3100.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>28</td>\n",
       "      <td>2018-02-01 00:00:00</td>\n",
       "      <td>2019-01-31 00:00:00</td>\n",
       "      <td>专业中介</td>\n",
       "      <td>东风日产</td>\n",
       "      <td>轩逸</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>交商全保</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座及9座以下非营运客车(含越野)</td>\n",
       "      <td>106800</td>\n",
       "      <td>7</td>\n",
       "      <td>交强险</td>\n",
       "      <td>4.上年发生一次有责不涉及死亡的事故</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>38.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>NaN</td>\n",
       "      <td>896.23</td>\n",
       "      <td>2</td>\n",
       "      <td>260.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>29</td>\n",
       "      <td>2017-01-13 00:00:00</td>\n",
       "      <td>2018-01-12 00:00:00</td>\n",
       "      <td>电网销</td>\n",
       "      <td>一汽大众</td>\n",
       "      <td>宝来</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>单交强</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座及9座以下非营运客车(含越野)</td>\n",
       "      <td>137900</td>\n",
       "      <td>12</td>\n",
       "      <td>交强险</td>\n",
       "      <td>1.连续3+无事故</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>54.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>NaN</td>\n",
       "      <td>627.36</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>30</td>\n",
       "      <td>2018-09-27 00:00:00</td>\n",
       "      <td>2019-09-26 00:00:00</td>\n",
       "      <td>个人代理</td>\n",
       "      <td>夏利</td>\n",
       "      <td>夏利</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>交商全保</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座以下客车</td>\n",
       "      <td>32900</td>\n",
       "      <td>7</td>\n",
       "      <td>商业险</td>\n",
       "      <td>c.过去一年未出险</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>32.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>500000.0</td>\n",
       "      <td>1011.75</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65505</th>\n",
       "      <td>65506</td>\n",
       "      <td>2017-06-30 00:00:00</td>\n",
       "      <td>2018-06-29 00:00:00</td>\n",
       "      <td>专业中介</td>\n",
       "      <td>福田</td>\n",
       "      <td>欧曼昆仑</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>单交强</td>\n",
       "      <td>是</td>\n",
       "      <td>营业货车</td>\n",
       "      <td>10吨及10吨以上货车</td>\n",
       "      <td>矿山作业用车</td>\n",
       "      <td>370000</td>\n",
       "      <td>6</td>\n",
       "      <td>交强险</td>\n",
       "      <td>4.上年发生一次有责不涉及死亡的事故</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>38.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>NaN</td>\n",
       "      <td>4226.42</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65506</th>\n",
       "      <td>65507</td>\n",
       "      <td>2018-03-02 00:00:00</td>\n",
       "      <td>2019-03-01 00:00:00</td>\n",
       "      <td>车商渠道</td>\n",
       "      <td>英菲尼迪</td>\n",
       "      <td>英菲尼迪QX30</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>交商全保</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座及9座以下非营运客车(含越野)</td>\n",
       "      <td>275800</td>\n",
       "      <td>1</td>\n",
       "      <td>交强险</td>\n",
       "      <td>3.上年未发生有责事故</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>F</td>\n",
       "      <td>28.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>NaN</td>\n",
       "      <td>806.60</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65507</th>\n",
       "      <td>65508</td>\n",
       "      <td>2018-01-24 00:00:00</td>\n",
       "      <td>2019-01-23 00:00:00</td>\n",
       "      <td>个人代理</td>\n",
       "      <td>上汽通用五菱</td>\n",
       "      <td>通用五菱微卡</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>单交强</td>\n",
       "      <td>是</td>\n",
       "      <td>营业货车</td>\n",
       "      <td>2吨以下货车</td>\n",
       "      <td>旅游载客汽车</td>\n",
       "      <td>35000</td>\n",
       "      <td>7</td>\n",
       "      <td>交强险</td>\n",
       "      <td>1.连续3+无事故</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>23.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1221.70</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65508</th>\n",
       "      <td>65509</td>\n",
       "      <td>2018-11-29 00:00:00</td>\n",
       "      <td>2019-11-28 00:00:00</td>\n",
       "      <td>个人代理</td>\n",
       "      <td>跃进</td>\n",
       "      <td>超利卡</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>单交强</td>\n",
       "      <td>是</td>\n",
       "      <td>营业货车</td>\n",
       "      <td>2吨及5吨以下货车</td>\n",
       "      <td>矿山作业用车</td>\n",
       "      <td>80000</td>\n",
       "      <td>13</td>\n",
       "      <td>交强险</td>\n",
       "      <td>1.连续3+无事故</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>39.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2027.36</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65509</th>\n",
       "      <td>65510</td>\n",
       "      <td>2018-12-07 00:00:00</td>\n",
       "      <td>2019-12-06 00:00:00</td>\n",
       "      <td>电网销</td>\n",
       "      <td>一汽奔腾</td>\n",
       "      <td>奔腾X40</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>交商全保</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座以下客车</td>\n",
       "      <td>101800</td>\n",
       "      <td>1</td>\n",
       "      <td>商业险</td>\n",
       "      <td>f.上年出险一次</td>\n",
       "      <td>C</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>30.0</td>\n",
       "      <td>投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>500000.0</td>\n",
       "      <td>2614.71</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65510</th>\n",
       "      <td>65511</td>\n",
       "      <td>2018-12-05 00:00:00</td>\n",
       "      <td>2019-12-04 00:00:00</td>\n",
       "      <td>个人代理</td>\n",
       "      <td>上汽通用五菱</td>\n",
       "      <td>五菱之光/五菱扬光</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>单交强</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座及10座以下客车</td>\n",
       "      <td>9座及9座以下非营运客车(含越野)</td>\n",
       "      <td>29000</td>\n",
       "      <td>7</td>\n",
       "      <td>交强险</td>\n",
       "      <td>1.连续3+无事故</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>36.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>NaN</td>\n",
       "      <td>726.42</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65511</th>\n",
       "      <td>65512</td>\n",
       "      <td>2018-12-06 00:00:00</td>\n",
       "      <td>2019-12-05 00:00:00</td>\n",
       "      <td>个人代理</td>\n",
       "      <td>北京汽车</td>\n",
       "      <td>北京汽车E系列</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>交商全保</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座及9座以下非营运客车(含越野)</td>\n",
       "      <td>54800</td>\n",
       "      <td>4</td>\n",
       "      <td>交强险</td>\n",
       "      <td>3.上年未发生有责事故</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>60.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>NaN</td>\n",
       "      <td>806.60</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65512</th>\n",
       "      <td>65513</td>\n",
       "      <td>2017-05-15 00:00:00</td>\n",
       "      <td>2018-05-14 00:00:00</td>\n",
       "      <td>车商渠道</td>\n",
       "      <td>东风悦达起亚</td>\n",
       "      <td>东风悦达起亚K2</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>交商全保</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座以下客车</td>\n",
       "      <td>82900</td>\n",
       "      <td>2</td>\n",
       "      <td>商业险</td>\n",
       "      <td>a.过去三年未出险</td>\n",
       "      <td>C</td>\n",
       "      <td>个人</td>\n",
       "      <td>F</td>\n",
       "      <td>48.0</td>\n",
       "      <td>投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>500000.0</td>\n",
       "      <td>1609.08</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65513</th>\n",
       "      <td>65514</td>\n",
       "      <td>2017-08-03 00:00:00</td>\n",
       "      <td>2018-08-02 00:00:00</td>\n",
       "      <td>个人代理</td>\n",
       "      <td>夏利</td>\n",
       "      <td>夏利</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>单交强</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座及9座以下非营运客车(含越野)</td>\n",
       "      <td>37000</td>\n",
       "      <td>7</td>\n",
       "      <td>交强险</td>\n",
       "      <td>1.连续3+无事故</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>48.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>NaN</td>\n",
       "      <td>627.36</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65514</th>\n",
       "      <td>65515</td>\n",
       "      <td>2017-11-07 00:00:00</td>\n",
       "      <td>2018-11-06 00:00:00</td>\n",
       "      <td>个人代理</td>\n",
       "      <td>上汽通用五菱</td>\n",
       "      <td>宏光</td>\n",
       "      <td>续保</td>\n",
       "      <td>1</td>\n",
       "      <td>交商全保</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座及10座以下客车</td>\n",
       "      <td>9座及9座以下非营运客车(含越野)</td>\n",
       "      <td>52300</td>\n",
       "      <td>0</td>\n",
       "      <td>交强险</td>\n",
       "      <td>3.上年未发生有责事故</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>38.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>NaN</td>\n",
       "      <td>933.96</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65515</th>\n",
       "      <td>65516</td>\n",
       "      <td>2017-09-27 00:00:00</td>\n",
       "      <td>2018-09-26 00:00:00</td>\n",
       "      <td>专业中介</td>\n",
       "      <td>一汽奥迪</td>\n",
       "      <td>一汽奥迪A4</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>交商全保</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座以下客车</td>\n",
       "      <td>248000</td>\n",
       "      <td>3</td>\n",
       "      <td>商业险</td>\n",
       "      <td>f.上年出险一次</td>\n",
       "      <td>D</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>44.0</td>\n",
       "      <td>投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>投保车上人员</td>\n",
       "      <td>1000000.0</td>\n",
       "      <td>6729.97</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65516</th>\n",
       "      <td>65517</td>\n",
       "      <td>2016-03-17 00:00:00</td>\n",
       "      <td>2017-03-16 00:00:00</td>\n",
       "      <td>个人代理</td>\n",
       "      <td>一汽大众</td>\n",
       "      <td>捷达</td>\n",
       "      <td>续保</td>\n",
       "      <td>1</td>\n",
       "      <td>单交强</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座及9座以下非营运客车(含越野)</td>\n",
       "      <td>84300</td>\n",
       "      <td>5</td>\n",
       "      <td>交强险</td>\n",
       "      <td>2.连续2年无事故</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>30.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>NaN</td>\n",
       "      <td>760.00</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65517</th>\n",
       "      <td>65518</td>\n",
       "      <td>2018-06-05 00:00:00</td>\n",
       "      <td>2019-06-04 00:00:00</td>\n",
       "      <td>个人代理</td>\n",
       "      <td>上汽通用别克</td>\n",
       "      <td>英朗</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>单交强</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座及9座以下非营运客车(含越野)</td>\n",
       "      <td>114900</td>\n",
       "      <td>5</td>\n",
       "      <td>交强险</td>\n",
       "      <td>1.连续3+无事故</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>F</td>\n",
       "      <td>39.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>NaN</td>\n",
       "      <td>627.36</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65518</th>\n",
       "      <td>65519</td>\n",
       "      <td>2016-07-31 00:00:00</td>\n",
       "      <td>2017-07-30 00:00:00</td>\n",
       "      <td>电网销</td>\n",
       "      <td>现代</td>\n",
       "      <td>胜达SANTA FE</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>单交强</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座及10座以下客车</td>\n",
       "      <td>9座及9座以下非营运客车(含越野)</td>\n",
       "      <td>240000</td>\n",
       "      <td>3</td>\n",
       "      <td>交强险</td>\n",
       "      <td>1.连续3+无事故</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>39.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>NaN</td>\n",
       "      <td>726.42</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65519</th>\n",
       "      <td>65520</td>\n",
       "      <td>2018-07-28 00:00:00</td>\n",
       "      <td>2019-07-27 00:00:00</td>\n",
       "      <td>车商渠道</td>\n",
       "      <td>上汽通用雪佛兰</td>\n",
       "      <td>迈锐宝</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>交商全保</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座以下客车</td>\n",
       "      <td>137900</td>\n",
       "      <td>1</td>\n",
       "      <td>商业险</td>\n",
       "      <td>c.过去一年未出险</td>\n",
       "      <td>C</td>\n",
       "      <td>个人</td>\n",
       "      <td>F</td>\n",
       "      <td>25.0</td>\n",
       "      <td>投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>500000.0</td>\n",
       "      <td>2788.56</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65520</th>\n",
       "      <td>65521</td>\n",
       "      <td>2017-04-19 00:00:00</td>\n",
       "      <td>2018-04-18 00:00:00</td>\n",
       "      <td>电网销</td>\n",
       "      <td>上汽大众</td>\n",
       "      <td>途观</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>交商全保</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座及9座以下非营运客车(含越野)</td>\n",
       "      <td>223800</td>\n",
       "      <td>1</td>\n",
       "      <td>交强险</td>\n",
       "      <td>4.上年发生一次有责不涉及死亡的事故</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>58.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>NaN</td>\n",
       "      <td>896.23</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65521</th>\n",
       "      <td>65522</td>\n",
       "      <td>2018-10-28 00:00:00</td>\n",
       "      <td>2019-10-27 00:00:00</td>\n",
       "      <td>车商渠道</td>\n",
       "      <td>东风日产</td>\n",
       "      <td>奇骏</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>交商全保</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座及9座以下非营运客车(含越野)</td>\n",
       "      <td>205800</td>\n",
       "      <td>1</td>\n",
       "      <td>交强险</td>\n",
       "      <td>4.上年发生一次有责不涉及死亡的事故</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>F</td>\n",
       "      <td>30.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>NaN</td>\n",
       "      <td>896.23</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65522</th>\n",
       "      <td>65523</td>\n",
       "      <td>2018-07-05 00:00:00</td>\n",
       "      <td>2019-07-04 00:00:00</td>\n",
       "      <td>专业中介</td>\n",
       "      <td>广汽本田</td>\n",
       "      <td>思迪/锋范</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>单交强</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座及9座以下非营运客车(含越野)</td>\n",
       "      <td>74800</td>\n",
       "      <td>6</td>\n",
       "      <td>交强险</td>\n",
       "      <td>2.连续2年无事故</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>31.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>NaN</td>\n",
       "      <td>716.98</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65523</th>\n",
       "      <td>65524</td>\n",
       "      <td>2018-03-06 00:00:00</td>\n",
       "      <td>2019-03-05 00:00:00</td>\n",
       "      <td>专业中介</td>\n",
       "      <td>奇瑞</td>\n",
       "      <td>瑞虎</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>单交强</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座及9座以下非营运客车(含越野)</td>\n",
       "      <td>76500</td>\n",
       "      <td>10</td>\n",
       "      <td>交强险</td>\n",
       "      <td>1.连续3+无事故</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>47.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>NaN</td>\n",
       "      <td>627.36</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65524</th>\n",
       "      <td>65525</td>\n",
       "      <td>2016-10-28 00:00:00</td>\n",
       "      <td>2017-10-27 00:00:00</td>\n",
       "      <td>车商渠道</td>\n",
       "      <td>广汽乘用车</td>\n",
       "      <td>传祺GS4</td>\n",
       "      <td>续保</td>\n",
       "      <td>1</td>\n",
       "      <td>交商全保</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座以下客车</td>\n",
       "      <td>119800</td>\n",
       "      <td>1</td>\n",
       "      <td>商业险</td>\n",
       "      <td>c.过去一年未出险</td>\n",
       "      <td>C</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>34.0</td>\n",
       "      <td>投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>1000000.0</td>\n",
       "      <td>3126.86</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65525</th>\n",
       "      <td>65526</td>\n",
       "      <td>2016-08-23 00:00:00</td>\n",
       "      <td>2017-08-22 00:00:00</td>\n",
       "      <td>电网销</td>\n",
       "      <td>东风悦达起亚</td>\n",
       "      <td>福瑞迪</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>交商全保</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座及9座以下非营运客车(含越野)</td>\n",
       "      <td>80800</td>\n",
       "      <td>4</td>\n",
       "      <td>交强险</td>\n",
       "      <td>4.上年发生一次有责不涉及死亡的事故</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>34.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>NaN</td>\n",
       "      <td>896.23</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65526</th>\n",
       "      <td>65527</td>\n",
       "      <td>2018-09-09 11:00:00</td>\n",
       "      <td>2019-09-08 11:00:00</td>\n",
       "      <td>电网销</td>\n",
       "      <td>大众</td>\n",
       "      <td>途欢TIGUAN</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>交商全保</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座及9座以下非营运客车(含越野)</td>\n",
       "      <td>232800</td>\n",
       "      <td>0</td>\n",
       "      <td>交强险</td>\n",
       "      <td>3.上年未发生有责事故</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>32.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>NaN</td>\n",
       "      <td>806.60</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65527</th>\n",
       "      <td>65528</td>\n",
       "      <td>2017-01-23 00:00:00</td>\n",
       "      <td>2018-01-22 00:00:00</td>\n",
       "      <td>电网销</td>\n",
       "      <td>夏利</td>\n",
       "      <td>夏利</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>交商全保</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座以下客车</td>\n",
       "      <td>27990</td>\n",
       "      <td>4</td>\n",
       "      <td>商业险</td>\n",
       "      <td>a.过去三年未出险</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>F</td>\n",
       "      <td>40.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>500000.0</td>\n",
       "      <td>809.40</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65528</th>\n",
       "      <td>65529</td>\n",
       "      <td>2016-03-31 00:00:00</td>\n",
       "      <td>2017-03-30 00:00:00</td>\n",
       "      <td>车商渠道</td>\n",
       "      <td>长安福特</td>\n",
       "      <td>翼搏</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>交商全保</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座以下客车</td>\n",
       "      <td>91800</td>\n",
       "      <td>1</td>\n",
       "      <td>商业险</td>\n",
       "      <td>f.上年出险一次</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>30.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>300000.0</td>\n",
       "      <td>1191.48</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65529</th>\n",
       "      <td>65530</td>\n",
       "      <td>2016-05-07 00:00:00</td>\n",
       "      <td>2017-05-06 00:00:00</td>\n",
       "      <td>电网销</td>\n",
       "      <td>长城</td>\n",
       "      <td>长城C50</td>\n",
       "      <td>续保</td>\n",
       "      <td>1</td>\n",
       "      <td>交商全保</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座及9座以下非营运客车(含越野)</td>\n",
       "      <td>74000</td>\n",
       "      <td>3</td>\n",
       "      <td>交强险</td>\n",
       "      <td>1.连续3+无事故</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>39.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>NaN</td>\n",
       "      <td>627.36</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65530</th>\n",
       "      <td>65531</td>\n",
       "      <td>2016-12-31 00:00:00</td>\n",
       "      <td>2017-12-30 00:00:00</td>\n",
       "      <td>个人代理</td>\n",
       "      <td>昌河</td>\n",
       "      <td>福瑞达</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>单交强</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座及10座以下客车</td>\n",
       "      <td>9座及9座以下非营运客车(含越野)</td>\n",
       "      <td>37800</td>\n",
       "      <td>9</td>\n",
       "      <td>交强险</td>\n",
       "      <td>4.上年发生一次有责不涉及死亡的事故</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>44.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1037.74</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65531</th>\n",
       "      <td>65532</td>\n",
       "      <td>2018-12-07 00:00:00</td>\n",
       "      <td>2019-12-06 00:00:00</td>\n",
       "      <td>专业中介</td>\n",
       "      <td>上汽大众</td>\n",
       "      <td>帕萨特</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>交商全保</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座以下客车</td>\n",
       "      <td>235800</td>\n",
       "      <td>4</td>\n",
       "      <td>商业险</td>\n",
       "      <td>b.过去两年未出险</td>\n",
       "      <td>C</td>\n",
       "      <td>个人</td>\n",
       "      <td>F</td>\n",
       "      <td>38.0</td>\n",
       "      <td>投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>500000.0</td>\n",
       "      <td>2953.32</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65532</th>\n",
       "      <td>65533</td>\n",
       "      <td>2017-09-28 00:00:00</td>\n",
       "      <td>2018-09-27 00:00:00</td>\n",
       "      <td>个人代理</td>\n",
       "      <td>上汽通用别克</td>\n",
       "      <td>君威</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>单交强</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座及9座以下非营运客车(含越野)</td>\n",
       "      <td>225900</td>\n",
       "      <td>7</td>\n",
       "      <td>交强险</td>\n",
       "      <td>4.上年发生一次有责不涉及死亡的事故</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>F</td>\n",
       "      <td>29.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>NaN</td>\n",
       "      <td>896.23</td>\n",
       "      <td>1</td>\n",
       "      <td>21285.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65533</th>\n",
       "      <td>65534</td>\n",
       "      <td>2018-05-05 00:00:00</td>\n",
       "      <td>2019-05-04 00:00:00</td>\n",
       "      <td>电网销</td>\n",
       "      <td>东风日产</td>\n",
       "      <td>奇骏</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>单商业</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座以下客车</td>\n",
       "      <td>211800</td>\n",
       "      <td>7</td>\n",
       "      <td>商业险</td>\n",
       "      <td>f.上年出险一次</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人</td>\n",
       "      <td>F</td>\n",
       "      <td>37.0</td>\n",
       "      <td>未投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>1000000.0</td>\n",
       "      <td>1550.63</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65534</th>\n",
       "      <td>65535</td>\n",
       "      <td>2018-12-24 00:00:00</td>\n",
       "      <td>2019-12-23 00:00:00</td>\n",
       "      <td>电网销</td>\n",
       "      <td>上汽大众</td>\n",
       "      <td>朗逸</td>\n",
       "      <td>转保</td>\n",
       "      <td>0</td>\n",
       "      <td>交商全保</td>\n",
       "      <td>是</td>\n",
       "      <td>家庭自用车</td>\n",
       "      <td>6座以下客车</td>\n",
       "      <td>9座以下客车</td>\n",
       "      <td>134900</td>\n",
       "      <td>4</td>\n",
       "      <td>商业险</td>\n",
       "      <td>b.过去两年未出险</td>\n",
       "      <td>B</td>\n",
       "      <td>个人</td>\n",
       "      <td>M</td>\n",
       "      <td>41.0</td>\n",
       "      <td>投保车损</td>\n",
       "      <td>未投保盗抢</td>\n",
       "      <td>未投保车上人员</td>\n",
       "      <td>500000.0</td>\n",
       "      <td>1913.08</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>65535 rows × 29 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "         保单号                起保日期                终止日期           渠道       品牌  \\\n",
       "0          1 2018-02-17 00:00:00 2019-02-16 00:00:00          电网销   上汽通用别克   \n",
       "1          2 2018-05-11 00:00:00 2019-05-10 00:00:00         个人代理     一汽大众   \n",
       "2          3 2018-05-04 00:00:00 2019-05-03 00:00:00         个人代理   四川一汽丰田   \n",
       "3          4 2018-06-03 00:00:00 2019-06-02 00:00:00         交叉销售       长安   \n",
       "4          5 2018-10-17 00:00:00 2019-10-16 00:00:00         车商渠道     北京现代   \n",
       "5          6 2018-09-29 00:00:00 2019-09-28 00:00:00          电网销       宝马   \n",
       "6          7 2018-11-13 00:00:00 2019-11-12 00:00:00          电网销  力帆(乘用车)   \n",
       "7          8 2017-04-28 00:00:00 2018-04-27 00:00:00  普通兼代(含银行代理)       夏利   \n",
       "8          9 2017-07-07 00:00:00 2018-07-06 00:00:00         个人代理       别克   \n",
       "9         10 2016-02-15 00:00:00 2017-02-14 00:00:00         专业中介  上海通用雪佛兰   \n",
       "10        11 2018-10-27 00:00:00 2019-10-26 00:00:00          电网销     长安福特   \n",
       "11        12 2018-12-07 00:00:00 2019-12-06 00:00:00         专业中介   上汽通用五菱   \n",
       "12        13 2018-10-14 00:00:00 2019-10-13 00:00:00         车商渠道     一汽奥迪   \n",
       "13        14 2018-07-25 00:00:00 2019-07-24 00:00:00         个人代理     北京现代   \n",
       "14        15 2018-11-20 00:00:00 2019-11-19 00:00:00         个人代理     东风风行   \n",
       "15        16 2017-07-15 00:00:00 2018-07-14 00:00:00          电网销       哈弗   \n",
       "16        17 2016-10-14 15:00:00 2017-10-13 15:00:00         个人代理     一汽大众   \n",
       "17        18 2018-06-30 00:00:00 2019-06-29 00:00:00         专业中介     一汽大众   \n",
       "18        19 2018-07-26 00:00:00 2019-07-25 00:00:00          电网销     长安福特   \n",
       "19        20 2018-07-28 00:00:00 2019-07-27 00:00:00         车商渠道       长城   \n",
       "20        21 2018-07-11 13:00:00 2019-07-10 13:00:00         专业中介       江淮   \n",
       "21        22 2017-04-20 00:00:00 2018-04-19 00:00:00         个人代理     长安福特   \n",
       "22        23 2016-11-11 00:00:00 2017-11-10 00:00:00         车商渠道  上汽大众斯柯达   \n",
       "23        24 2016-10-31 00:00:00 2017-10-30 00:00:00         车商渠道      沃尔沃   \n",
       "24        25 2017-03-19 00:00:00 2018-03-18 00:00:00  普通兼代(含银行代理)     一汽大众   \n",
       "25        26 2017-05-22 00:00:00 2018-05-21 00:00:00         车商渠道   四川一汽丰田   \n",
       "26        27 2017-01-07 00:00:00 2018-01-06 00:00:00          电网销    长安马自达   \n",
       "27        28 2018-02-01 00:00:00 2019-01-31 00:00:00         专业中介     东风日产   \n",
       "28        29 2017-01-13 00:00:00 2018-01-12 00:00:00          电网销     一汽大众   \n",
       "29        30 2018-09-27 00:00:00 2019-09-26 00:00:00         个人代理       夏利   \n",
       "...      ...                 ...                 ...          ...      ...   \n",
       "65505  65506 2017-06-30 00:00:00 2018-06-29 00:00:00         专业中介       福田   \n",
       "65506  65507 2018-03-02 00:00:00 2019-03-01 00:00:00         车商渠道     英菲尼迪   \n",
       "65507  65508 2018-01-24 00:00:00 2019-01-23 00:00:00         个人代理   上汽通用五菱   \n",
       "65508  65509 2018-11-29 00:00:00 2019-11-28 00:00:00         个人代理       跃进   \n",
       "65509  65510 2018-12-07 00:00:00 2019-12-06 00:00:00          电网销     一汽奔腾   \n",
       "65510  65511 2018-12-05 00:00:00 2019-12-04 00:00:00         个人代理   上汽通用五菱   \n",
       "65511  65512 2018-12-06 00:00:00 2019-12-05 00:00:00         个人代理     北京汽车   \n",
       "65512  65513 2017-05-15 00:00:00 2018-05-14 00:00:00         车商渠道   东风悦达起亚   \n",
       "65513  65514 2017-08-03 00:00:00 2018-08-02 00:00:00         个人代理       夏利   \n",
       "65514  65515 2017-11-07 00:00:00 2018-11-06 00:00:00         个人代理   上汽通用五菱   \n",
       "65515  65516 2017-09-27 00:00:00 2018-09-26 00:00:00         专业中介     一汽奥迪   \n",
       "65516  65517 2016-03-17 00:00:00 2017-03-16 00:00:00         个人代理     一汽大众   \n",
       "65517  65518 2018-06-05 00:00:00 2019-06-04 00:00:00         个人代理   上汽通用别克   \n",
       "65518  65519 2016-07-31 00:00:00 2017-07-30 00:00:00          电网销       现代   \n",
       "65519  65520 2018-07-28 00:00:00 2019-07-27 00:00:00         车商渠道  上汽通用雪佛兰   \n",
       "65520  65521 2017-04-19 00:00:00 2018-04-18 00:00:00          电网销     上汽大众   \n",
       "65521  65522 2018-10-28 00:00:00 2019-10-27 00:00:00         车商渠道     东风日产   \n",
       "65522  65523 2018-07-05 00:00:00 2019-07-04 00:00:00         专业中介     广汽本田   \n",
       "65523  65524 2018-03-06 00:00:00 2019-03-05 00:00:00         专业中介       奇瑞   \n",
       "65524  65525 2016-10-28 00:00:00 2017-10-27 00:00:00         车商渠道    广汽乘用车   \n",
       "65525  65526 2016-08-23 00:00:00 2017-08-22 00:00:00          电网销   东风悦达起亚   \n",
       "65526  65527 2018-09-09 11:00:00 2019-09-08 11:00:00          电网销       大众   \n",
       "65527  65528 2017-01-23 00:00:00 2018-01-22 00:00:00          电网销       夏利   \n",
       "65528  65529 2016-03-31 00:00:00 2017-03-30 00:00:00         车商渠道     长安福特   \n",
       "65529  65530 2016-05-07 00:00:00 2017-05-06 00:00:00          电网销       长城   \n",
       "65530  65531 2016-12-31 00:00:00 2017-12-30 00:00:00         个人代理       昌河   \n",
       "65531  65532 2018-12-07 00:00:00 2019-12-06 00:00:00         专业中介     上汽大众   \n",
       "65532  65533 2017-09-28 00:00:00 2018-09-27 00:00:00         个人代理   上汽通用别克   \n",
       "65533  65534 2018-05-05 00:00:00 2019-05-04 00:00:00          电网销     东风日产   \n",
       "65534  65535 2018-12-24 00:00:00 2019-12-23 00:00:00          电网销     上汽大众   \n",
       "\n",
       "               车系 保单性质  续保年  投保类别 是否本省车牌     使用性质         车辆种类  \\\n",
       "0              英朗   转保    0  交商全保      是    家庭自用车       6座以下客车   \n",
       "1              迈腾   转保    0  交商全保      是  企业非营业用车       6座以下客车   \n",
       "2      四川一汽丰田RAV4   转保    0  交商全保      是    家庭自用车       6座以下客车   \n",
       "3            悦翔V5   转保    0   单商业      是    家庭自用车       6座以下客车   \n",
       "4             伊兰特   转保    0   单交强      是    家庭自用车       6座以下客车   \n",
       "5            宝马X3   续保    8  交商全保      是    家庭自用车       6座以下客车   \n",
       "6           力帆320   转保    0  交商全保      是    家庭自用车       6座以下客车   \n",
       "7              夏利   转保    0   单交强      是    家庭自用车       6座以下客车   \n",
       "8      昂科雷ENCLAVE   转保    0  交商全保      是  企业非营业用车   6座及10座以下客车   \n",
       "9             科鲁兹   转保    0   单交强      是    家庭自用车       6座以下客车   \n",
       "10            福克斯   转保    0   单商业      是    家庭自用车       6座以下客车   \n",
       "11      五菱之光/五菱扬光   转保    0   单交强      是    家庭自用车   6座及10座以下客车   \n",
       "12         一汽奥迪Q5   转保    0  交商全保      是    家庭自用车       6座以下客车   \n",
       "13             途胜   转保    0   单交强      是    家庭自用车       6座以下客车   \n",
       "14          风行SX6   转保    0   单交强      是    家庭自用车   6座及10座以下客车   \n",
       "15           哈弗H1   转保    0  交商全保      是    家庭自用车       6座以下客车   \n",
       "16         一汽大众CC   转保    0   单交强      是    家庭自用车       6座以下客车   \n",
       "17             宝来   转保    0   单商业      是    家庭自用车       6座以下客车   \n",
       "18            福睿斯   转保    0  交商全保      是    家庭自用车       6座以下客车   \n",
       "19             风骏   转保    0  交商全保      是    非营业货车       2吨以下货车   \n",
       "20             瑞风   转保    0   单交强      是    家庭自用车   6座及10座以下客车   \n",
       "21            嘉年华   转保    0   单交强      是    家庭自用车       6座以下客车   \n",
       "22             明锐   续保    1  交商全保      是    家庭自用车       6座以下客车   \n",
       "23         沃尔沃V40   续保    1  交商全保      是    家庭自用车       6座以下客车   \n",
       "24             捷达   转保    0  交商全保      是    家庭自用车       6座以下客车   \n",
       "25            卡罗拉   转保    0  交商全保      是    家庭自用车       6座以下客车   \n",
       "26         长安马自达3   转保    0  交商全保      是    家庭自用车       6座以下客车   \n",
       "27             轩逸   转保    0  交商全保      是    家庭自用车       6座以下客车   \n",
       "28             宝来   转保    0   单交强      是    家庭自用车       6座以下客车   \n",
       "29             夏利   转保    0  交商全保      是    家庭自用车       6座以下客车   \n",
       "...           ...  ...  ...   ...    ...      ...          ...   \n",
       "65505        欧曼昆仑   转保    0   单交强      是     营业货车  10吨及10吨以上货车   \n",
       "65506    英菲尼迪QX30   转保    0  交商全保      是    家庭自用车       6座以下客车   \n",
       "65507      通用五菱微卡   转保    0   单交强      是     营业货车       2吨以下货车   \n",
       "65508         超利卡   转保    0   单交强      是     营业货车    2吨及5吨以下货车   \n",
       "65509       奔腾X40   转保    0  交商全保      是    家庭自用车       6座以下客车   \n",
       "65510   五菱之光/五菱扬光   转保    0   单交强      是    家庭自用车   6座及10座以下客车   \n",
       "65511     北京汽车E系列   转保    0  交商全保      是    家庭自用车       6座以下客车   \n",
       "65512    东风悦达起亚K2   转保    0  交商全保      是    家庭自用车       6座以下客车   \n",
       "65513          夏利   转保    0   单交强      是    家庭自用车       6座以下客车   \n",
       "65514          宏光   续保    1  交商全保      是    家庭自用车   6座及10座以下客车   \n",
       "65515      一汽奥迪A4   转保    0  交商全保      是    家庭自用车       6座以下客车   \n",
       "65516          捷达   续保    1   单交强      是    家庭自用车       6座以下客车   \n",
       "65517          英朗   转保    0   单交强      是    家庭自用车       6座以下客车   \n",
       "65518  胜达SANTA FE   转保    0   单交强      是    家庭自用车   6座及10座以下客车   \n",
       "65519         迈锐宝   转保    0  交商全保      是    家庭自用车       6座以下客车   \n",
       "65520          途观   转保    0  交商全保      是    家庭自用车       6座以下客车   \n",
       "65521          奇骏   转保    0  交商全保      是    家庭自用车       6座以下客车   \n",
       "65522       思迪/锋范   转保    0   单交强      是    家庭自用车       6座以下客车   \n",
       "65523          瑞虎   转保    0   单交强      是    家庭自用车       6座以下客车   \n",
       "65524       传祺GS4   续保    1  交商全保      是    家庭自用车       6座以下客车   \n",
       "65525         福瑞迪   转保    0  交商全保      是    家庭自用车       6座以下客车   \n",
       "65526    途欢TIGUAN   转保    0  交商全保      是    家庭自用车       6座以下客车   \n",
       "65527          夏利   转保    0  交商全保      是    家庭自用车       6座以下客车   \n",
       "65528          翼搏   转保    0  交商全保      是    家庭自用车       6座以下客车   \n",
       "65529       长城C50   续保    1  交商全保      是    家庭自用车       6座以下客车   \n",
       "65530         福瑞达   转保    0   单交强      是    家庭自用车   6座及10座以下客车   \n",
       "65531         帕萨特   转保    0  交商全保      是    家庭自用车       6座以下客车   \n",
       "65532          君威   转保    0   单交强      是    家庭自用车       6座以下客车   \n",
       "65533          奇骏   转保    0   单商业      是    家庭自用车       6座以下客车   \n",
       "65534          朗逸   转保    0  交商全保      是    家庭自用车       6座以下客车   \n",
       "\n",
       "                    车辆用途   新车购置价  车龄   险种                 NCD 风险类别（A最低，E最高）  \\\n",
       "0                 9座以下客车  100900   1  商业险           c.过去一年未出险             C   \n",
       "1      9座及9座以下非营运客车(含越野)  191800   1  交强险         3.上年未发生有责事故           NaN   \n",
       "2      9座及9座以下非营运客车(含越野)  200800   2  交强险           2.连续2年无事故           NaN   \n",
       "3                 9座以下客车   56900   4  商业险           c.过去一年未出险           NaN   \n",
       "4      9座及9座以下非营运客车(含越野)   81600  14  交强险           2.连续2年无事故           NaN   \n",
       "5                 9座以下客车  665000  11  商业险            f.上年出险一次           NaN   \n",
       "6                 9座以下客车   32500   5  商业险           b.过去两年未出险           NaN   \n",
       "7      9座及9座以下非营运客车(含越野)   29800   7  交强险           1.连续3+无事故           NaN   \n",
       "8      9座及9座以下非营运客车(含越野)  429000   6  交强险  4.上年发生一次有责不涉及死亡的事故           NaN   \n",
       "9      9座及9座以下非营运客车(含越野)  116900   3  交强险  4.上年发生一次有责不涉及死亡的事故           NaN   \n",
       "10                9座以下客车  102900   8  商业险               e.新过户           NaN   \n",
       "11     9座及9座以下非营运客车(含越野)   29000   7  交强险           1.连续3+无事故           NaN   \n",
       "12                9座以下客车  345240   5  商业险            g.上年出险二次           NaN   \n",
       "13     9座及9座以下非营运客车(含越野)  120800   9  交强险           1.连续3+无事故           NaN   \n",
       "14     9座及9座以下非营运客车(含越野)   69900   2  交强险           2.连续2年无事故           NaN   \n",
       "15     9座及9座以下非营运客车(含越野)   59900   2  交强险           2.连续2年无事故           NaN   \n",
       "16     9座及9座以下非营运客车(含越野)  246800   6  交强险  4.上年发生一次有责不涉及死亡的事故           NaN   \n",
       "17                9座以下客车  128300   5  商业险               e.新过户             B   \n",
       "18     9座及9座以下非营运客车(含越野)   82800   2  交强险           2.连续2年无事故           NaN   \n",
       "19                矿山作业用车   84800   1  交强险  4.上年发生一次有责不涉及死亡的事故           NaN   \n",
       "20     9座及9座以下非营运客车(含越野)  118000   4  交强险  4.上年发生一次有责不涉及死亡的事故           NaN   \n",
       "21     9座及9座以下非营运客车(含越野)   69600  13  交强险           2.连续2年无事故           NaN   \n",
       "22                9座以下客车   95900   1  商业险           c.过去一年未出险             C   \n",
       "23                9座以下客车  227900   1  商业险           b.过去两年未出险             C   \n",
       "24     9座及9座以下非营运客车(含越野)   70800   8  交强险           1.连续3+无事故           NaN   \n",
       "25                9座以下客车  122800   4  商业险           c.过去一年未出险             D   \n",
       "26                9座以下客车   95800   4  商业险           c.过去一年未出险           NaN   \n",
       "27     9座及9座以下非营运客车(含越野)  106800   7  交强险  4.上年发生一次有责不涉及死亡的事故           NaN   \n",
       "28     9座及9座以下非营运客车(含越野)  137900  12  交强险           1.连续3+无事故           NaN   \n",
       "29                9座以下客车   32900   7  商业险           c.过去一年未出险           NaN   \n",
       "...                  ...     ...  ..  ...                 ...           ...   \n",
       "65505             矿山作业用车  370000   6  交强险  4.上年发生一次有责不涉及死亡的事故           NaN   \n",
       "65506  9座及9座以下非营运客车(含越野)  275800   1  交强险         3.上年未发生有责事故           NaN   \n",
       "65507             旅游载客汽车   35000   7  交强险           1.连续3+无事故           NaN   \n",
       "65508             矿山作业用车   80000  13  交强险           1.连续3+无事故           NaN   \n",
       "65509             9座以下客车  101800   1  商业险            f.上年出险一次             C   \n",
       "65510  9座及9座以下非营运客车(含越野)   29000   7  交强险           1.连续3+无事故           NaN   \n",
       "65511  9座及9座以下非营运客车(含越野)   54800   4  交强险         3.上年未发生有责事故           NaN   \n",
       "65512             9座以下客车   82900   2  商业险           a.过去三年未出险             C   \n",
       "65513  9座及9座以下非营运客车(含越野)   37000   7  交强险           1.连续3+无事故           NaN   \n",
       "65514  9座及9座以下非营运客车(含越野)   52300   0  交强险         3.上年未发生有责事故           NaN   \n",
       "65515             9座以下客车  248000   3  商业险            f.上年出险一次             D   \n",
       "65516  9座及9座以下非营运客车(含越野)   84300   5  交强险           2.连续2年无事故           NaN   \n",
       "65517  9座及9座以下非营运客车(含越野)  114900   5  交强险           1.连续3+无事故           NaN   \n",
       "65518  9座及9座以下非营运客车(含越野)  240000   3  交强险           1.连续3+无事故           NaN   \n",
       "65519             9座以下客车  137900   1  商业险           c.过去一年未出险             C   \n",
       "65520  9座及9座以下非营运客车(含越野)  223800   1  交强险  4.上年发生一次有责不涉及死亡的事故           NaN   \n",
       "65521  9座及9座以下非营运客车(含越野)  205800   1  交强险  4.上年发生一次有责不涉及死亡的事故           NaN   \n",
       "65522  9座及9座以下非营运客车(含越野)   74800   6  交强险           2.连续2年无事故           NaN   \n",
       "65523  9座及9座以下非营运客车(含越野)   76500  10  交强险           1.连续3+无事故           NaN   \n",
       "65524             9座以下客车  119800   1  商业险           c.过去一年未出险             C   \n",
       "65525  9座及9座以下非营运客车(含越野)   80800   4  交强险  4.上年发生一次有责不涉及死亡的事故           NaN   \n",
       "65526  9座及9座以下非营运客车(含越野)  232800   0  交强险         3.上年未发生有责事故           NaN   \n",
       "65527             9座以下客车   27990   4  商业险           a.过去三年未出险           NaN   \n",
       "65528             9座以下客车   91800   1  商业险            f.上年出险一次           NaN   \n",
       "65529  9座及9座以下非营运客车(含越野)   74000   3  交强险           1.连续3+无事故           NaN   \n",
       "65530  9座及9座以下非营运客车(含越野)   37800   9  交强险  4.上年发生一次有责不涉及死亡的事故           NaN   \n",
       "65531             9座以下客车  235800   4  商业险           b.过去两年未出险             C   \n",
       "65532  9座及9座以下非营运客车(含越野)  225900   7  交强险  4.上年发生一次有责不涉及死亡的事故           NaN   \n",
       "65533             9座以下客车  211800   7  商业险            f.上年出险一次           NaN   \n",
       "65534             9座以下客车  134900   4  商业险           b.过去两年未出险             B   \n",
       "\n",
       "      客户类别 被保险人性别  被保险人年龄 是否投保车损 是否投保盗抢 是否投保车上人员      三者险保额     签单保费  立案件数  \\\n",
       "0       个人      F    27.0   投保车损  未投保盗抢  未投保车上人员   500000.0  2264.60     0   \n",
       "1       个人      F    36.0  未投保车损  未投保盗抢  未投保车上人员        NaN   849.06     0   \n",
       "2       个人      F    46.0  未投保车损  未投保盗抢  未投保车上人员        NaN   716.98     0   \n",
       "3       个人      M    28.0  未投保车损  未投保盗抢  未投保车上人员   500000.0  1011.75     1   \n",
       "4       个人      M    49.0  未投保车损  未投保盗抢  未投保车上人员        NaN   716.98     0   \n",
       "5       个人      F    42.0  未投保车损  未投保盗抢  未投保车上人员   500000.0  1190.29     0   \n",
       "6       个人      M    41.0  未投保车损  未投保盗抢  未投保车上人员   500000.0   833.21     0   \n",
       "7       个人      M    47.0  未投保车损  未投保盗抢  未投保车上人员        NaN   627.36     0   \n",
       "8       机构    NaN     NaN  未投保车损  未投保盗抢  未投保车上人员        NaN  1066.04     0   \n",
       "9       个人      M    26.0  未投保车损  未投保盗抢  未投保车上人员        NaN   950.00     1   \n",
       "10      个人      M    21.0  未投保车损  未投保盗抢  未投保车上人员   500000.0  1190.29     0   \n",
       "11      个人      M    32.0  未投保车损  未投保盗抢  未投保车上人员        NaN   726.42     0   \n",
       "12      个人      F    44.0  未投保车损  未投保盗抢  未投保车上人员   500000.0  1487.86     0   \n",
       "13      个人      M    56.0  未投保车损  未投保盗抢  未投保车上人员        NaN   627.36     0   \n",
       "14      个人      F    41.0  未投保车损  未投保盗抢  未投保车上人员        NaN   830.19     0   \n",
       "15      个人      M    55.0  未投保车损  未投保盗抢  未投保车上人员        NaN   716.98     0   \n",
       "16      个人      F    34.0  未投保车损  未投保盗抢  未投保车上人员        NaN   896.23     0   \n",
       "17      个人      M    23.0   投保车损   投保盗抢  未投保车上人员  1000000.0  3428.97     1   \n",
       "18      个人      M    45.0  未投保车损  未投保盗抢  未投保车上人员        NaN   716.98     0   \n",
       "19      个人      M    26.0  未投保车损  未投保盗抢  未投保车上人员        NaN  1132.08     0   \n",
       "20      个人      M    27.0  未投保车损  未投保盗抢  未投保车上人员        NaN  1037.74     0   \n",
       "21      个人      M    36.0  未投保车损  未投保盗抢  未投保车上人员        NaN   716.98     1   \n",
       "22      个人      M    28.0   投保车损   投保盗抢   投保车上人员   500000.0  3597.03     0   \n",
       "23      个人      F    52.0   投保车损  未投保盗抢  未投保车上人员   300000.0  3367.47     1   \n",
       "24      个人      M    34.0  未投保车损  未投保盗抢  未投保车上人员        NaN   627.36     0   \n",
       "25      个人      M    26.0   投保车损   投保盗抢  未投保车上人员  1000000.0  3498.70     0   \n",
       "26      个人      M    32.0  未投保车损  未投保盗抢  未投保车上人员   500000.0  1146.65     1   \n",
       "27      个人      M    38.0  未投保车损  未投保盗抢  未投保车上人员        NaN   896.23     2   \n",
       "28      个人      M    54.0  未投保车损  未投保盗抢  未投保车上人员        NaN   627.36     0   \n",
       "29      个人      M    32.0  未投保车损  未投保盗抢  未投保车上人员   500000.0  1011.75     0   \n",
       "...    ...    ...     ...    ...    ...      ...        ...      ...   ...   \n",
       "65505   个人      M    38.0  未投保车损  未投保盗抢  未投保车上人员        NaN  4226.42     0   \n",
       "65506   个人      F    28.0  未投保车损  未投保盗抢  未投保车上人员        NaN   806.60     0   \n",
       "65507   个人      M    23.0  未投保车损  未投保盗抢  未投保车上人员        NaN  1221.70     0   \n",
       "65508   个人      M    39.0  未投保车损  未投保盗抢  未投保车上人员        NaN  2027.36     0   \n",
       "65509   个人      M    30.0   投保车损  未投保盗抢  未投保车上人员   500000.0  2614.71     0   \n",
       "65510   个人      M    36.0  未投保车损  未投保盗抢  未投保车上人员        NaN   726.42     0   \n",
       "65511   个人      M    60.0  未投保车损  未投保盗抢  未投保车上人员        NaN   806.60     0   \n",
       "65512   个人      F    48.0   投保车损  未投保盗抢  未投保车上人员   500000.0  1609.08     0   \n",
       "65513   个人      M    48.0  未投保车损  未投保盗抢  未投保车上人员        NaN   627.36     0   \n",
       "65514   个人      M    38.0  未投保车损  未投保盗抢  未投保车上人员        NaN   933.96     0   \n",
       "65515   个人      M    44.0   投保车损  未投保盗抢   投保车上人员  1000000.0  6729.97     0   \n",
       "65516   个人      M    30.0  未投保车损  未投保盗抢  未投保车上人员        NaN   760.00     0   \n",
       "65517   个人      F    39.0  未投保车损  未投保盗抢  未投保车上人员        NaN   627.36     0   \n",
       "65518   个人      M    39.0  未投保车损  未投保盗抢  未投保车上人员        NaN   726.42     0   \n",
       "65519   个人      F    25.0   投保车损  未投保盗抢  未投保车上人员   500000.0  2788.56     0   \n",
       "65520   个人      M    58.0  未投保车损  未投保盗抢  未投保车上人员        NaN   896.23     0   \n",
       "65521   个人      F    30.0  未投保车损  未投保盗抢  未投保车上人员        NaN   896.23     0   \n",
       "65522   个人      M    31.0  未投保车损  未投保盗抢  未投保车上人员        NaN   716.98     0   \n",
       "65523   个人      M    47.0  未投保车损  未投保盗抢  未投保车上人员        NaN   627.36     0   \n",
       "65524   个人      M    34.0   投保车损  未投保盗抢  未投保车上人员  1000000.0  3126.86     0   \n",
       "65525   个人      M    34.0  未投保车损  未投保盗抢  未投保车上人员        NaN   896.23     0   \n",
       "65526   个人      M    32.0  未投保车损  未投保盗抢  未投保车上人员        NaN   806.60     0   \n",
       "65527   个人      F    40.0  未投保车损  未投保盗抢  未投保车上人员   500000.0   809.40     0   \n",
       "65528   个人      M    30.0  未投保车损  未投保盗抢  未投保车上人员   300000.0  1191.48     0   \n",
       "65529   个人      M    39.0  未投保车损  未投保盗抢  未投保车上人员        NaN   627.36     0   \n",
       "65530   个人      M    44.0  未投保车损  未投保盗抢  未投保车上人员        NaN  1037.74     0   \n",
       "65531   个人      F    38.0   投保车损  未投保盗抢  未投保车上人员   500000.0  2953.32     0   \n",
       "65532   个人      F    29.0  未投保车损  未投保盗抢  未投保车上人员        NaN   896.23     1   \n",
       "65533   个人      F    37.0  未投保车损  未投保盗抢  未投保车上人员  1000000.0  1550.63     0   \n",
       "65534   个人      M    41.0   投保车损  未投保盗抢  未投保车上人员   500000.0  1913.08     0   \n",
       "\n",
       "          已决赔款  是否续保  \n",
       "0          NaN   0.0  \n",
       "1          NaN   0.0  \n",
       "2          NaN   0.0  \n",
       "3          NaN   0.0  \n",
       "4          NaN   0.0  \n",
       "5          NaN   1.0  \n",
       "6          NaN   0.0  \n",
       "7          NaN   0.0  \n",
       "8          NaN   0.0  \n",
       "9        744.0   0.0  \n",
       "10         NaN   0.0  \n",
       "11         NaN   0.0  \n",
       "12         NaN   0.0  \n",
       "13         NaN   0.0  \n",
       "14         NaN   0.0  \n",
       "15         NaN   0.0  \n",
       "16         NaN   0.0  \n",
       "17      1273.0   0.0  \n",
       "18         NaN   0.0  \n",
       "19         NaN   0.0  \n",
       "20         NaN   0.0  \n",
       "21       500.0   0.0  \n",
       "22         NaN   1.0  \n",
       "23      9023.0   1.0  \n",
       "24         NaN   0.0  \n",
       "25         NaN   0.0  \n",
       "26      3100.0   0.0  \n",
       "27       260.0   0.0  \n",
       "28         NaN   0.0  \n",
       "29         NaN   0.0  \n",
       "...        ...   ...  \n",
       "65505      NaN   0.0  \n",
       "65506      NaN   0.0  \n",
       "65507      NaN   0.0  \n",
       "65508      NaN   0.0  \n",
       "65509      NaN   0.0  \n",
       "65510      NaN   0.0  \n",
       "65511      NaN   0.0  \n",
       "65512      NaN   0.0  \n",
       "65513      NaN   0.0  \n",
       "65514      NaN   1.0  \n",
       "65515      NaN   0.0  \n",
       "65516      NaN   1.0  \n",
       "65517      NaN   0.0  \n",
       "65518      NaN   0.0  \n",
       "65519      NaN   0.0  \n",
       "65520      NaN   0.0  \n",
       "65521      NaN   0.0  \n",
       "65522      NaN   0.0  \n",
       "65523      NaN   0.0  \n",
       "65524      NaN   1.0  \n",
       "65525      NaN   0.0  \n",
       "65526      NaN   0.0  \n",
       "65527      NaN   0.0  \n",
       "65528      NaN   0.0  \n",
       "65529      NaN   1.0  \n",
       "65530      NaN   0.0  \n",
       "65531      NaN   0.0  \n",
       "65532  21285.0   0.0  \n",
       "65533      NaN   0.0  \n",
       "65534      NaN   0.0  \n",
       "\n",
       "[65535 rows x 29 columns]"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_path='data.xlsx'\n",
    "data=pd.read_excel(io=data_path,encoding='gbk')\n",
    "def transform(row):\n",
    "    if row['是否续保']=='是':\n",
    "        row['是否续保']='1'\n",
    "    else:\n",
    "        row['是否续保']='0'\n",
    "    return row\n",
    "data_ture=data.apply(transform,axis=1)\n",
    "data_ture['是否续保'] = data_ture['是否续保'].astype(np.float64)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### 数据特征提取"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "保单号              65535\n",
       "起保日期              6596\n",
       "终止日期              5716\n",
       "渠道                   8\n",
       "品牌                 376\n",
       "车系                1309\n",
       "保单性质                 2\n",
       "续保年                  9\n",
       "投保类别                 3\n",
       "是否本省车牌               3\n",
       "使用性质                 9\n",
       "车辆种类                16\n",
       "车辆用途                16\n",
       "新车购置价             2639\n",
       "车龄                  25\n",
       "险种                   2\n",
       "NCD                 16\n",
       "风险类别（A最低，E最高）        5\n",
       "客户类别                 2\n",
       "被保险人性别               2\n",
       "被保险人年龄              58\n",
       "是否投保车损               2\n",
       "是否投保盗抢               2\n",
       "是否投保车上人员             2\n",
       "三者险保额               10\n",
       "签单保费             16857\n",
       "立案件数                10\n",
       "已决赔款              3466\n",
       "是否续保                 2\n",
       "dtype: int64"
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#各列数据值的个数\n",
    "data.nunique()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "ename": "TypeError",
     "evalue": "append() takes exactly one argument (0 given)",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mTypeError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-10-0e372deed76f>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m      2\u001b[0m \u001b[0mdata_group\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mdata_ture\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mgroupby\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'渠道'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m'是否续保'\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0magg\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m{\u001b[0m\u001b[1;34m'续保概率'\u001b[0m\u001b[1;33m:\u001b[0m\u001b[0mnp\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mmean\u001b[0m\u001b[1;33m}\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      3\u001b[0m \u001b[0mdata_group\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mdata_ture\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mgroupby\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'品牌'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m'是否续保'\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0magg\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m{\u001b[0m\u001b[1;34m'续保概率'\u001b[0m\u001b[1;33m:\u001b[0m\u001b[0mnp\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mmean\u001b[0m\u001b[1;33m}\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 4\u001b[1;33m \u001b[0mdata_group\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m      5\u001b[0m \u001b[0mdata_group\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      6\u001b[0m \u001b[0mdata_group\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;31mTypeError\u001b[0m: append() takes exactly one argument (0 given)"
     ]
    }
   ],
   "source": [
    "data_group=[]\n",
    "data_group.append(data_ture.groupby('渠道')['是否续保'].agg({'续保概率':np.mean}))\n",
    "data_group.append(data_ture.groupby('品牌')['是否续保'].agg({'续保概率':np.mean}))\n",
    "data_group.append(data_ture.groupby('保单性质')['是否续保'].agg({'续保概率':np.mean}))\n",
    "data_group.append(data_ture.groupby('投保类别')['是否续保'].agg({'续保概率':np.mean}))\n",
    "data_group.append(data_ture.groupby('NCD')['是否续保'].agg({'续保概率':np.mean}))\n",
    "data_group.append(data_ture.groupby('风险类别（A最低，E最高）')['是否续保'].agg({'续保概率':np.mean}))\n",
    "data_group.append(data_ture.groupby('客户类别')['是否续保'].agg({'续保概率':np.mean}))\n",
    "data_group.append(data_ture.groupby('被保险人性别')['是否续保'].agg({'续保概率':np.mean})\n",
    "data_group.append(data_ture.groupby('是否投保盗抢')['是否续保'].agg({'续保概率':np.mean}))\n",
    "data_group.append(data_ture.groupby('是否投保车损')['是否续保'].agg({'续保概率':np.mean}))\n",
    "data_group.append(data_ture.groupby('是否投保车上人员')['是否续保'].agg({'续保概率':np.mean}))\n",
    "\n",
    "           "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "pandas.core.frame.DataFrame"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(data_ture.groupby('是否投保车上人员')['是否续保'].agg({'续保概率':np.mean}))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "c:\\users\\buttle\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\ipykernel_launcher.py:1: FutureWarning: using a dict on a Series for aggregation\n",
      "is deprecated and will be removed in a future version\n",
      "  \"\"\"Entry point for launching an IPython kernel.\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>续保概率</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>品牌</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>MG名爵</th>\n",
       "      <td>0.271552</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>一汽华利</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>一汽吉林</th>\n",
       "      <td>0.212121</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>一汽大众</th>\n",
       "      <td>0.172679</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>一汽大发</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>一汽奔腾</th>\n",
       "      <td>0.200000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>一汽奥迪</th>\n",
       "      <td>0.307289</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>一汽欧朗</th>\n",
       "      <td>0.400000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>一汽红旗</th>\n",
       "      <td>0.100000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>一汽马自达</th>\n",
       "      <td>0.195122</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>万丰</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>万荣</th>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>三一汽车</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>三一重工</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>三兴</th>\n",
       "      <td>0.666667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>三力</th>\n",
       "      <td>0.142857</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>三星</th>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>三菱</th>\n",
       "      <td>0.052632</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>上元</th>\n",
       "      <td>0.153846</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>上汽大众</th>\n",
       "      <td>0.119691</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>上汽大众斯柯达</th>\n",
       "      <td>0.288743</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>上汽大通</th>\n",
       "      <td>0.173913</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>上汽通用五菱</th>\n",
       "      <td>0.155855</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>上汽通用五菱雪佛兰</th>\n",
       "      <td>0.156627</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>上汽通用凯迪拉克</th>\n",
       "      <td>0.305785</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>上汽通用别克</th>\n",
       "      <td>0.209730</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>上汽通用雪佛兰</th>\n",
       "      <td>0.194121</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>上海大众</th>\n",
       "      <td>0.419023</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>上海大众斯柯达</th>\n",
       "      <td>0.583851</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>上海大通</th>\n",
       "      <td>0.333333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>雪佛兰</th>\n",
       "      <td>0.222222</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>雪铁龙</th>\n",
       "      <td>0.500000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>雷克萨斯</th>\n",
       "      <td>0.131783</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>雷诺</th>\n",
       "      <td>0.410714</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>青专</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>青岛五菱</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>青年莲花</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>风潮</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>飞球</th>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>飞碟</th>\n",
       "      <td>0.130435</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>飞花</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>飞雁</th>\n",
       "      <td>0.666667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>马自达</th>\n",
       "      <td>0.300000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>驰乐</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>驼马</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>骊山</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>骏强</th>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>骜通</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>魏派</th>\n",
       "      <td>0.312500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>鲁威</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>鲁岳</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>鲁旭达</th>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>鲸象</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>鸿雁(济南)</th>\n",
       "      <td>0.166667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>麒强</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>黄河</th>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>黄海</th>\n",
       "      <td>0.031250</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>黑豹(北京)</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>齐安</th>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>龙工</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>376 rows × 1 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "               续保概率\n",
       "品牌                 \n",
       "MG名爵       0.271552\n",
       "一汽华利       0.000000\n",
       "一汽吉林       0.212121\n",
       "一汽大众       0.172679\n",
       "一汽大发       0.000000\n",
       "一汽奔腾       0.200000\n",
       "一汽奥迪       0.307289\n",
       "一汽欧朗       0.400000\n",
       "一汽红旗       0.100000\n",
       "一汽马自达      0.195122\n",
       "万丰         0.000000\n",
       "万荣         1.000000\n",
       "三一汽车       0.000000\n",
       "三一重工       0.000000\n",
       "三兴         0.666667\n",
       "三力         0.142857\n",
       "三星         1.000000\n",
       "三菱         0.052632\n",
       "上元         0.153846\n",
       "上汽大众       0.119691\n",
       "上汽大众斯柯达    0.288743\n",
       "上汽大通       0.173913\n",
       "上汽通用五菱     0.155855\n",
       "上汽通用五菱雪佛兰  0.156627\n",
       "上汽通用凯迪拉克   0.305785\n",
       "上汽通用别克     0.209730\n",
       "上汽通用雪佛兰    0.194121\n",
       "上海大众       0.419023\n",
       "上海大众斯柯达    0.583851\n",
       "上海大通       0.333333\n",
       "...             ...\n",
       "雪佛兰        0.222222\n",
       "雪铁龙        0.500000\n",
       "雷克萨斯       0.131783\n",
       "雷诺         0.410714\n",
       "青专         0.000000\n",
       "青岛五菱       0.000000\n",
       "青年莲花       0.000000\n",
       "风潮         0.000000\n",
       "飞球         1.000000\n",
       "飞碟         0.130435\n",
       "飞花         0.000000\n",
       "飞雁         0.666667\n",
       "马自达        0.300000\n",
       "驰乐         0.000000\n",
       "驼马         0.000000\n",
       "骊山         0.000000\n",
       "骏强         1.000000\n",
       "骜通         0.000000\n",
       "魏派         0.312500\n",
       "鲁威         0.000000\n",
       "鲁岳         0.000000\n",
       "鲁旭达        1.000000\n",
       "鲸象         0.000000\n",
       "鸿雁(济南)     0.166667\n",
       "麒强         0.000000\n",
       "黄河         1.000000\n",
       "黄海         0.031250\n",
       "黑豹(北京)     0.000000\n",
       "齐安         1.000000\n",
       "龙工         0.000000\n",
       "\n",
       "[376 rows x 1 columns]"
      ]
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_group=data_ture.groupby('品牌')['是否续保'].agg({'续保概率':np.mean})\n",
    "data_group"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "c:\\users\\buttle\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\ipykernel_launcher.py:1: FutureWarning: using a dict on a Series for aggregation\n",
      "is deprecated and will be removed in a future version\n",
      "  \"\"\"Entry point for launching an IPython kernel.\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>续保概率</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>车系</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>ASX劲炫</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C4世嘉</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>CA7220</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>F50</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>KX CROSS</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>LANNIA 蓝鸟</th>\n",
       "      <td>0.324324</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>SPARK乐驰</th>\n",
       "      <td>0.156627</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>TRAX创酷</th>\n",
       "      <td>0.133333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>UR-V</th>\n",
       "      <td>0.071429</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Yeti</th>\n",
       "      <td>0.377778</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>一汽佳星幸福使者</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>一汽吉林专用车</th>\n",
       "      <td>0.181818</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>一汽吉林微型货车</th>\n",
       "      <td>0.081081</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>一汽哈轻轻卡</th>\n",
       "      <td>0.090909</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>一汽大众CC</th>\n",
       "      <td>0.033058</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>一汽奥迪100</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>一汽奥迪A3</th>\n",
       "      <td>0.464286</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>一汽奥迪A4</th>\n",
       "      <td>0.356846</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>一汽奥迪A6</th>\n",
       "      <td>0.211802</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>一汽奥迪Q3</th>\n",
       "      <td>0.502008</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>一汽奥迪Q5</th>\n",
       "      <td>0.311475</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>一汽红塔自卸车</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>一汽红塔自由风</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>一汽红塔轻卡</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>一汽马自达6</th>\n",
       "      <td>0.203297</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>一汽马自达8</th>\n",
       "      <td>0.250000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>一汽马自达CX-4</th>\n",
       "      <td>0.117647</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>一汽马自达CX-7</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>万荣半挂车</th>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>三一混凝土搅拌车</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>骊威</th>\n",
       "      <td>0.149701</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>骊山6米公路客车</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>骏强半挂车</th>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>骏意</th>\n",
       "      <td>0.500000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>骏捷</th>\n",
       "      <td>0.168919</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>骏派D60</th>\n",
       "      <td>0.222222</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>骏逸</th>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>骏铃</th>\n",
       "      <td>0.133333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>骏马</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>骐达</th>\n",
       "      <td>0.178112</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>骐运</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>骑士</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>骜通半挂车</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>高尔</th>\n",
       "      <td>0.111111</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>高尔夫</th>\n",
       "      <td>0.158931</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>高尔夫GOLF</th>\n",
       "      <td>0.391304</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>魏派VV5</th>\n",
       "      <td>0.428571</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>魏派VV7</th>\n",
       "      <td>0.280000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>鲁威邮政车</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>鲁岳半挂车</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>鲁旭达半挂车</th>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>鲸象喷洒车</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>鸿途</th>\n",
       "      <td>0.111111</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>麒强半挂车</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>麦柯斯</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>黄河少帅</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>黄河货车</th>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>齐安半挂车</th>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>龙卡</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>龙工装载机</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1309 rows × 1 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "               续保概率\n",
       "车系                 \n",
       "ASX劲炫      0.000000\n",
       "C4世嘉       0.000000\n",
       "CA7220     0.000000\n",
       "F50        0.000000\n",
       "KX CROSS   0.000000\n",
       "LANNIA 蓝鸟  0.324324\n",
       "SPARK乐驰    0.156627\n",
       "TRAX创酷     0.133333\n",
       "UR-V       0.071429\n",
       "Yeti       0.377778\n",
       "一汽佳星幸福使者   0.000000\n",
       "一汽吉林专用车    0.181818\n",
       "一汽吉林微型货车   0.081081\n",
       "一汽哈轻轻卡     0.090909\n",
       "一汽大众CC     0.033058\n",
       "一汽奥迪100    0.000000\n",
       "一汽奥迪A3     0.464286\n",
       "一汽奥迪A4     0.356846\n",
       "一汽奥迪A6     0.211802\n",
       "一汽奥迪Q3     0.502008\n",
       "一汽奥迪Q5     0.311475\n",
       "一汽红塔自卸车    0.000000\n",
       "一汽红塔自由风    0.000000\n",
       "一汽红塔轻卡     0.000000\n",
       "一汽马自达6     0.203297\n",
       "一汽马自达8     0.250000\n",
       "一汽马自达CX-4  0.117647\n",
       "一汽马自达CX-7  0.000000\n",
       "万荣半挂车      1.000000\n",
       "三一混凝土搅拌车   0.000000\n",
       "...             ...\n",
       "骊威         0.149701\n",
       "骊山6米公路客车   0.000000\n",
       "骏强半挂车      1.000000\n",
       "骏意         0.500000\n",
       "骏捷         0.168919\n",
       "骏派D60      0.222222\n",
       "骏逸         1.000000\n",
       "骏铃         0.133333\n",
       "骏马         0.000000\n",
       "骐达         0.178112\n",
       "骐运         0.000000\n",
       "骑士         0.000000\n",
       "骜通半挂车      0.000000\n",
       "高尔         0.111111\n",
       "高尔夫        0.158931\n",
       "高尔夫GOLF    0.391304\n",
       "魏派VV5      0.428571\n",
       "魏派VV7      0.280000\n",
       "鲁威邮政车      0.000000\n",
       "鲁岳半挂车      0.000000\n",
       "鲁旭达半挂车     1.000000\n",
       "鲸象喷洒车      0.000000\n",
       "鸿途         0.111111\n",
       "麒强半挂车      0.000000\n",
       "麦柯斯        0.000000\n",
       "黄河少帅       0.000000\n",
       "黄河货车       1.000000\n",
       "齐安半挂车      1.000000\n",
       "龙卡         0.000000\n",
       "龙工装载机      0.000000\n",
       "\n",
       "[1309 rows x 1 columns]"
      ]
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_group=data_ture.groupby('车系')['是否续保'].agg({'续保概率':np.mean})\n",
    "data_group"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "c:\\users\\buttle\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\ipykernel_launcher.py:1: FutureWarning: using a dict on a Series for aggregation\n",
      "is deprecated and will be removed in a future version\n",
      "  \"\"\"Entry point for launching an IPython kernel.\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>续保概率</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>保单性质</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>续保</th>\n",
       "      <td>0.981906</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>转保</th>\n",
       "      <td>0.000267</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          续保概率\n",
       "保单性质          \n",
       "续保    0.981906\n",
       "转保    0.000267"
      ]
     },
     "execution_count": 40,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_group=data_ture.groupby('保单性质')['是否续保'].agg({'续保概率':np.mean})\n",
    "data_group"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "c:\\users\\buttle\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\ipykernel_launcher.py:1: FutureWarning: using a dict on a Series for aggregation\n",
      "is deprecated and will be removed in a future version\n",
      "  \"\"\"Entry point for launching an IPython kernel.\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>续保概率</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>续保年</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.000267</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0.981575</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.982766</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.987086</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0.984786</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>0.982051</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>0.927536</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>0.937500</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         续保概率\n",
       "续保年          \n",
       "0    0.000267\n",
       "1    0.981575\n",
       "2    0.982766\n",
       "3    0.987086\n",
       "4    0.984786\n",
       "5    0.982051\n",
       "6    0.927536\n",
       "7    1.000000\n",
       "8    0.937500"
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_group=data_ture.groupby('续保年')['是否续保'].agg({'续保概率':np.mean})\n",
    "data_group"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "c:\\users\\buttle\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\ipykernel_launcher.py:1: FutureWarning: using a dict on a Series for aggregation\n",
      "is deprecated and will be removed in a future version\n",
      "  \"\"\"Entry point for launching an IPython kernel.\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>续保概率</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>投保类别</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>交商全保</th>\n",
       "      <td>0.227523</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>单交强</th>\n",
       "      <td>0.105316</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>单商业</th>\n",
       "      <td>0.095727</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          续保概率\n",
       "投保类别          \n",
       "交商全保  0.227523\n",
       "单交强   0.105316\n",
       "单商业   0.095727"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_group=data_ture.groupby('投保类别')['是否续保'].agg({'续保概率':np.mean})\n",
    "data_group"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "c:\\users\\buttle\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\ipykernel_launcher.py:1: FutureWarning: using a dict on a Series for aggregation\n",
      "is deprecated and will be removed in a future version\n",
      "  \"\"\"Entry point for launching an IPython kernel.\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>续保概率</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>是否本省车牌</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>临时</th>\n",
       "      <td>0.496503</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>否</th>\n",
       "      <td>0.241762</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>是</th>\n",
       "      <td>0.190243</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            续保概率\n",
       "是否本省车牌          \n",
       "临时      0.496503\n",
       "否       0.241762\n",
       "是       0.190243"
      ]
     },
     "execution_count": 46,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_ture.groupby('是否本省车牌')['是否续保'].agg({'续保概率':np.mean})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "c:\\users\\buttle\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\ipykernel_launcher.py:1: FutureWarning: using a dict on a Series for aggregation\n",
      "is deprecated and will be removed in a future version\n",
      "  \"\"\"Entry point for launching an IPython kernel.\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>续保概率</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>使用性质</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>企业非营业用车</th>\n",
       "      <td>0.199611</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>党政机关、事业团体用车</th>\n",
       "      <td>0.213270</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>公路客运</th>\n",
       "      <td>0.036585</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>出租租赁</th>\n",
       "      <td>0.605263</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>城市公交</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>家庭自用车</th>\n",
       "      <td>0.192387</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>特种车</th>\n",
       "      <td>0.355895</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>营业货车</th>\n",
       "      <td>0.247221</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>非营业货车</th>\n",
       "      <td>0.145185</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                 续保概率\n",
       "使用性质                 \n",
       "企业非营业用车      0.199611\n",
       "党政机关、事业团体用车  0.213270\n",
       "公路客运         0.036585\n",
       "出租租赁         0.605263\n",
       "城市公交         0.000000\n",
       "家庭自用车        0.192387\n",
       "特种车          0.355895\n",
       "营业货车         0.247221\n",
       "非营业货车        0.145185"
      ]
     },
     "execution_count": 47,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_ture.groupby('使用性质')['是否续保'].agg({'续保概率':np.mean})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "c:\\users\\buttle\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\ipykernel_launcher.py:1: FutureWarning: using a dict on a Series for aggregation\n",
      "is deprecated and will be removed in a future version\n",
      "  \"\"\"Entry point for launching an IPython kernel.\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>续保概率</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>车辆种类</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>10吨及10吨以上挂车</th>\n",
       "      <td>0.584541</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10吨及10吨以上货车</th>\n",
       "      <td>0.305600</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10座及20座以下客车</th>\n",
       "      <td>0.152542</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20座及36座以下客车</th>\n",
       "      <td>0.013699</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2吨以下货车</th>\n",
       "      <td>0.135991</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2吨及5吨以下货车</th>\n",
       "      <td>0.380282</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>36座及36座以上客车</th>\n",
       "      <td>0.162651</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5吨及10吨以下挂车</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5吨及10吨以下货车</th>\n",
       "      <td>0.155340</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6座以下客车</th>\n",
       "      <td>0.196360</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6座及10座以下客车</th>\n",
       "      <td>0.160708</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>低速载货汽车</th>\n",
       "      <td>0.545455</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>特种车一</th>\n",
       "      <td>0.461538</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>特种车三</th>\n",
       "      <td>0.436681</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>特种车二</th>\n",
       "      <td>0.257009</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>特种车二挂车</th>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                 续保概率\n",
       "车辆种类                 \n",
       "10吨及10吨以上挂车  0.584541\n",
       "10吨及10吨以上货车  0.305600\n",
       "10座及20座以下客车  0.152542\n",
       "20座及36座以下客车  0.013699\n",
       "2吨以下货车       0.135991\n",
       "2吨及5吨以下货车    0.380282\n",
       "36座及36座以上客车  0.162651\n",
       "5吨及10吨以下挂车   0.000000\n",
       "5吨及10吨以下货车   0.155340\n",
       "6座以下客车       0.196360\n",
       "6座及10座以下客车   0.160708\n",
       "低速载货汽车       0.545455\n",
       "特种车一         0.461538\n",
       "特种车三         0.436681\n",
       "特种车二         0.257009\n",
       "特种车二挂车       1.000000"
      ]
     },
     "execution_count": 48,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_ture.groupby('车辆种类')['是否续保'].agg({'续保概率':np.mean})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "c:\\users\\buttle\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\ipykernel_launcher.py:1: FutureWarning: using a dict on a Series for aggregation\n",
      "is deprecated and will be removed in a future version\n",
      "  \"\"\"Entry point for launching an IPython kernel.\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>续保概率</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>车辆用途</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>10座以上客车</th>\n",
       "      <td>0.139037</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9座以上非营运客车</th>\n",
       "      <td>0.136150</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9座以下客车</th>\n",
       "      <td>0.189769</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9座及9座以下非营运客车(含越野)</th>\n",
       "      <td>0.194834</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>低速货车和三轮汽车</th>\n",
       "      <td>0.666667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>其他汽车</th>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>其他车辆</th>\n",
       "      <td>0.230648</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>出租车</th>\n",
       "      <td>0.253968</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>带拖挂汽车</th>\n",
       "      <td>0.125000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>带拖挂的载货汽车</th>\n",
       "      <td>0.694497</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>微型载货汽车</th>\n",
       "      <td>0.281437</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>旅游载客汽车</th>\n",
       "      <td>0.154839</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>矿山专用车</th>\n",
       "      <td>0.142857</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>矿山作业用车</th>\n",
       "      <td>0.113952</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>轻微型载货汽车</th>\n",
       "      <td>0.650000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>重、中型载货汽车</th>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                       续保概率\n",
       "车辆用途                       \n",
       "10座以上客车            0.139037\n",
       "9座以上非营运客车          0.136150\n",
       "9座以下客车             0.189769\n",
       "9座及9座以下非营运客车(含越野)  0.194834\n",
       "低速货车和三轮汽车          0.666667\n",
       "其他汽车               1.000000\n",
       "其他车辆               0.230648\n",
       "出租车                0.253968\n",
       "带拖挂汽车              0.125000\n",
       "带拖挂的载货汽车           0.694497\n",
       "微型载货汽车             0.281437\n",
       "旅游载客汽车             0.154839\n",
       "矿山专用车              0.142857\n",
       "矿山作业用车             0.113952\n",
       "轻微型载货汽车            0.650000\n",
       "重、中型载货汽车           1.000000"
      ]
     },
     "execution_count": 49,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_ture.groupby('车辆用途')['是否续保'].agg({'续保概率':np.mean})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "c:\\users\\buttle\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\ipykernel_launcher.py:1: FutureWarning: using a dict on a Series for aggregation\n",
      "is deprecated and will be removed in a future version\n",
      "  \"\"\"Entry point for launching an IPython kernel.\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>续保概率</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>新车购置价</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>18800</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20800</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20898</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21000</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22000</th>\n",
       "      <td>0.166667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22500</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23800</th>\n",
       "      <td>0.125000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24000</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24100</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24500</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24999</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25000</th>\n",
       "      <td>0.100000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25500</th>\n",
       "      <td>0.230769</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25800</th>\n",
       "      <td>0.114943</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25900</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26000</th>\n",
       "      <td>0.085714</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26300</th>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26500</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26800</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26900</th>\n",
       "      <td>0.198413</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27000</th>\n",
       "      <td>0.200000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27300</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27400</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27500</th>\n",
       "      <td>0.029412</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27600</th>\n",
       "      <td>0.153846</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27800</th>\n",
       "      <td>0.166667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27891</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27900</th>\n",
       "      <td>0.500000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27990</th>\n",
       "      <td>0.133333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28000</th>\n",
       "      <td>0.087379</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1700000</th>\n",
       "      <td>0.333333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1700500</th>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1728000</th>\n",
       "      <td>0.625000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1730000</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1738000</th>\n",
       "      <td>0.500000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1750000</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1760000</th>\n",
       "      <td>0.500000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1778000</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1798000</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1880000</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1900000</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1918000</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1920000</th>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1998000</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2098000</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2143000</th>\n",
       "      <td>0.750000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2148000</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2188000</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2208000</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2298000</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2300000</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2430500</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2638000</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2650000</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2700000</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2980000</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3000000</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3298000</th>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3950000</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5100000</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>2639 rows × 1 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "             续保概率\n",
       "新车购置价            \n",
       "18800    0.000000\n",
       "20800    0.000000\n",
       "20898    0.000000\n",
       "21000    0.000000\n",
       "22000    0.166667\n",
       "22500    0.000000\n",
       "23800    0.125000\n",
       "24000    0.000000\n",
       "24100    0.000000\n",
       "24500    0.000000\n",
       "24999    0.000000\n",
       "25000    0.100000\n",
       "25500    0.230769\n",
       "25800    0.114943\n",
       "25900    0.000000\n",
       "26000    0.085714\n",
       "26300    1.000000\n",
       "26500    0.000000\n",
       "26800    0.000000\n",
       "26900    0.198413\n",
       "27000    0.200000\n",
       "27300    0.000000\n",
       "27400    0.000000\n",
       "27500    0.029412\n",
       "27600    0.153846\n",
       "27800    0.166667\n",
       "27891    0.000000\n",
       "27900    0.500000\n",
       "27990    0.133333\n",
       "28000    0.087379\n",
       "...           ...\n",
       "1700000  0.333333\n",
       "1700500  1.000000\n",
       "1728000  0.625000\n",
       "1730000  0.000000\n",
       "1738000  0.500000\n",
       "1750000  0.000000\n",
       "1760000  0.500000\n",
       "1778000  0.000000\n",
       "1798000  0.000000\n",
       "1880000  0.000000\n",
       "1900000  0.000000\n",
       "1918000  0.000000\n",
       "1920000  1.000000\n",
       "1998000  0.000000\n",
       "2098000  0.000000\n",
       "2143000  0.750000\n",
       "2148000  0.000000\n",
       "2188000  0.000000\n",
       "2208000  0.000000\n",
       "2298000  0.000000\n",
       "2300000  0.000000\n",
       "2430500  0.000000\n",
       "2638000  0.000000\n",
       "2650000  0.000000\n",
       "2700000  0.000000\n",
       "2980000  0.000000\n",
       "3000000  0.000000\n",
       "3298000  1.000000\n",
       "3950000  0.000000\n",
       "5100000  0.000000\n",
       "\n",
       "[2639 rows x 1 columns]"
      ]
     },
     "execution_count": 50,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_ture.groupby('新车购置价')['是否续保'].agg({'续保概率':np.mean})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "c:\\users\\buttle\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\ipykernel_launcher.py:1: FutureWarning: using a dict on a Series for aggregation\n",
      "is deprecated and will be removed in a future version\n",
      "  \"\"\"Entry point for launching an IPython kernel.\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>续保概率</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>车龄</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.112208</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0.345862</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.213066</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.209219</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0.177882</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>0.151494</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>0.126444</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>0.106995</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>0.093023</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>0.102130</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>0.127352</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>0.100698</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>0.095791</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>0.122596</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>0.068729</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>0.087302</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>0.126582</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>0.115385</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>0.230769</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>0.200000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>0.333333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>0.500000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>0.500000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        续保概率\n",
       "车龄          \n",
       "0   0.112208\n",
       "1   0.345862\n",
       "2   0.213066\n",
       "3   0.209219\n",
       "4   0.177882\n",
       "5   0.151494\n",
       "6   0.126444\n",
       "7   0.106995\n",
       "8   0.093023\n",
       "9   0.102130\n",
       "10  0.127352\n",
       "11  0.100698\n",
       "12  0.095791\n",
       "13  0.122596\n",
       "14  0.068729\n",
       "15  0.087302\n",
       "16  0.126582\n",
       "17  0.115385\n",
       "18  0.230769\n",
       "19  0.000000\n",
       "20  0.200000\n",
       "21  0.333333\n",
       "22  0.500000\n",
       "23  0.500000\n",
       "24  0.000000"
      ]
     },
     "execution_count": 51,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_ture.groupby('车龄')['是否续保'].agg({'续保概率':np.mean})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "c:\\users\\buttle\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\ipykernel_launcher.py:1: FutureWarning: using a dict on a Series for aggregation\n",
      "is deprecated and will be removed in a future version\n",
      "  \"\"\"Entry point for launching an IPython kernel.\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>续保概率</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>险种</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>交强险</th>\n",
       "      <td>0.185854</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>商业险</th>\n",
       "      <td>0.207473</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         续保概率\n",
       "险种           \n",
       "交强险  0.185854\n",
       "商业险  0.207473"
      ]
     },
     "execution_count": 52,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_ture.groupby('险种')['是否续保'].agg({'续保概率':np.mean})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "c:\\users\\buttle\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\ipykernel_launcher.py:1: FutureWarning: using a dict on a Series for aggregation\n",
      "is deprecated and will be removed in a future version\n",
      "  \"\"\"Entry point for launching an IPython kernel.\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>续保概率</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>NCD</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1.连续3+无事故</th>\n",
       "      <td>0.173665</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2.连续2年无事故</th>\n",
       "      <td>0.186690</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3.上年未发生有责事故</th>\n",
       "      <td>0.243047</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4.上年发生一次有责不涉及死亡的事故</th>\n",
       "      <td>0.126180</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5.上年发生2+有责事故</th>\n",
       "      <td>0.248988</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6.上年发生有责死亡事故</th>\n",
       "      <td>0.250000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>a.过去三年未出险</th>\n",
       "      <td>0.213393</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>b.过去两年未出险</th>\n",
       "      <td>0.197896</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>c.过去一年未出险</th>\n",
       "      <td>0.291504</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>e.新过户</th>\n",
       "      <td>0.053250</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>f.上年出险一次</th>\n",
       "      <td>0.257311</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>g.上年出险二次</th>\n",
       "      <td>0.318328</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>h.上年出险三次</th>\n",
       "      <td>0.304094</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>i.上年出险四次</th>\n",
       "      <td>0.269231</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>j.上年出险五次及以上</th>\n",
       "      <td>0.125000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>新保无记录</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                        续保概率\n",
       "NCD                         \n",
       "1.连续3+无事故           0.173665\n",
       "2.连续2年无事故           0.186690\n",
       "3.上年未发生有责事故         0.243047\n",
       "4.上年发生一次有责不涉及死亡的事故  0.126180\n",
       "5.上年发生2+有责事故        0.248988\n",
       "6.上年发生有责死亡事故        0.250000\n",
       "a.过去三年未出险           0.213393\n",
       "b.过去两年未出险           0.197896\n",
       "c.过去一年未出险           0.291504\n",
       "e.新过户               0.053250\n",
       "f.上年出险一次            0.257311\n",
       "g.上年出险二次            0.318328\n",
       "h.上年出险三次            0.304094\n",
       "i.上年出险四次            0.269231\n",
       "j.上年出险五次及以上         0.125000\n",
       "新保无记录               0.000000"
      ]
     },
     "execution_count": 53,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_ture.groupby('NCD')['是否续保'].agg({'续保概率':np.mean})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "c:\\users\\buttle\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\ipykernel_launcher.py:1: FutureWarning: using a dict on a Series for aggregation\n",
      "is deprecated and will be removed in a future version\n",
      "  \"\"\"Entry point for launching an IPython kernel.\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>续保概率</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>风险类别（A最低，E最高）</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A</th>\n",
       "      <td>0.226843</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>B</th>\n",
       "      <td>0.189323</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>C</th>\n",
       "      <td>0.244693</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>D</th>\n",
       "      <td>0.278351</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>E</th>\n",
       "      <td>0.330484</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                   续保概率\n",
       "风险类别（A最低，E最高）          \n",
       "A              0.226843\n",
       "B              0.189323\n",
       "C              0.244693\n",
       "D              0.278351\n",
       "E              0.330484"
      ]
     },
     "execution_count": 55,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_ture.groupby('风险类别（A最低，E最高）')['是否续保'].agg({'续保概率':np.mean})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "c:\\users\\buttle\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\ipykernel_launcher.py:1: FutureWarning: using a dict on a Series for aggregation\n",
      "is deprecated and will be removed in a future version\n",
      "  \"\"\"Entry point for launching an IPython kernel.\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>续保概率</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>客户类别</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>个人</th>\n",
       "      <td>0.188071</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>机构</th>\n",
       "      <td>0.291876</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          续保概率\n",
       "客户类别          \n",
       "个人    0.188071\n",
       "机构    0.291876"
      ]
     },
     "execution_count": 57,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_ture.groupby('客户类别')['是否续保'].agg({'续保概率':np.mean})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "c:\\users\\buttle\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\ipykernel_launcher.py:1: FutureWarning: using a dict on a Series for aggregation\n",
      "is deprecated and will be removed in a future version\n",
      "  \"\"\"Entry point for launching an IPython kernel.\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>续保概率</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>被保险人性别</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>F</th>\n",
       "      <td>0.229800</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>M</th>\n",
       "      <td>0.172149</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            续保概率\n",
       "被保险人性别          \n",
       "F       0.229800\n",
       "M       0.172149"
      ]
     },
     "execution_count": 58,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_ture.groupby('被保险人性别')['是否续保'].agg({'续保概率':np.mean})\n",
    "#NA未考虑"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "c:\\users\\buttle\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\ipykernel_launcher.py:1: FutureWarning: using a dict on a Series for aggregation\n",
      "is deprecated and will be removed in a future version\n",
      "  \"\"\"Entry point for launching an IPython kernel.\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>续保概率</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>被保险人年龄</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>18.0</th>\n",
       "      <td>0.136364</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19.0</th>\n",
       "      <td>0.119048</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20.0</th>\n",
       "      <td>0.101796</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21.0</th>\n",
       "      <td>0.120879</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22.0</th>\n",
       "      <td>0.119084</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23.0</th>\n",
       "      <td>0.155455</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24.0</th>\n",
       "      <td>0.165254</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25.0</th>\n",
       "      <td>0.170795</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26.0</th>\n",
       "      <td>0.197288</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27.0</th>\n",
       "      <td>0.194404</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28.0</th>\n",
       "      <td>0.182073</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29.0</th>\n",
       "      <td>0.193269</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30.0</th>\n",
       "      <td>0.196692</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31.0</th>\n",
       "      <td>0.190889</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32.0</th>\n",
       "      <td>0.189358</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>33.0</th>\n",
       "      <td>0.199025</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>34.0</th>\n",
       "      <td>0.184902</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>35.0</th>\n",
       "      <td>0.191629</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>36.0</th>\n",
       "      <td>0.175262</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37.0</th>\n",
       "      <td>0.194101</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38.0</th>\n",
       "      <td>0.195866</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>39.0</th>\n",
       "      <td>0.194975</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>40.0</th>\n",
       "      <td>0.203883</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>41.0</th>\n",
       "      <td>0.198302</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>42.0</th>\n",
       "      <td>0.173163</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>43.0</th>\n",
       "      <td>0.189851</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>44.0</th>\n",
       "      <td>0.173507</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>45.0</th>\n",
       "      <td>0.186246</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>46.0</th>\n",
       "      <td>0.179049</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>47.0</th>\n",
       "      <td>0.180655</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>48.0</th>\n",
       "      <td>0.180124</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>49.0</th>\n",
       "      <td>0.187759</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50.0</th>\n",
       "      <td>0.205263</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>51.0</th>\n",
       "      <td>0.208672</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>52.0</th>\n",
       "      <td>0.241379</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>53.0</th>\n",
       "      <td>0.200295</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>54.0</th>\n",
       "      <td>0.170854</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>55.0</th>\n",
       "      <td>0.181467</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>56.0</th>\n",
       "      <td>0.222857</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>57.0</th>\n",
       "      <td>0.230769</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>58.0</th>\n",
       "      <td>0.143969</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>59.0</th>\n",
       "      <td>0.157258</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>60.0</th>\n",
       "      <td>0.251309</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>61.0</th>\n",
       "      <td>0.252874</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>62.0</th>\n",
       "      <td>0.225610</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>63.0</th>\n",
       "      <td>0.175926</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>64.0</th>\n",
       "      <td>0.253012</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65.0</th>\n",
       "      <td>0.171875</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>66.0</th>\n",
       "      <td>0.179487</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>67.0</th>\n",
       "      <td>0.176471</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>68.0</th>\n",
       "      <td>0.444444</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>69.0</th>\n",
       "      <td>0.230769</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>70.0</th>\n",
       "      <td>0.125000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>71.0</th>\n",
       "      <td>0.222222</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>72.0</th>\n",
       "      <td>0.166667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>73.0</th>\n",
       "      <td>0.500000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>74.0</th>\n",
       "      <td>0.500000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75.0</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            续保概率\n",
       "被保险人年龄          \n",
       "18.0    0.136364\n",
       "19.0    0.119048\n",
       "20.0    0.101796\n",
       "21.0    0.120879\n",
       "22.0    0.119084\n",
       "23.0    0.155455\n",
       "24.0    0.165254\n",
       "25.0    0.170795\n",
       "26.0    0.197288\n",
       "27.0    0.194404\n",
       "28.0    0.182073\n",
       "29.0    0.193269\n",
       "30.0    0.196692\n",
       "31.0    0.190889\n",
       "32.0    0.189358\n",
       "33.0    0.199025\n",
       "34.0    0.184902\n",
       "35.0    0.191629\n",
       "36.0    0.175262\n",
       "37.0    0.194101\n",
       "38.0    0.195866\n",
       "39.0    0.194975\n",
       "40.0    0.203883\n",
       "41.0    0.198302\n",
       "42.0    0.173163\n",
       "43.0    0.189851\n",
       "44.0    0.173507\n",
       "45.0    0.186246\n",
       "46.0    0.179049\n",
       "47.0    0.180655\n",
       "48.0    0.180124\n",
       "49.0    0.187759\n",
       "50.0    0.205263\n",
       "51.0    0.208672\n",
       "52.0    0.241379\n",
       "53.0    0.200295\n",
       "54.0    0.170854\n",
       "55.0    0.181467\n",
       "56.0    0.222857\n",
       "57.0    0.230769\n",
       "58.0    0.143969\n",
       "59.0    0.157258\n",
       "60.0    0.251309\n",
       "61.0    0.252874\n",
       "62.0    0.225610\n",
       "63.0    0.175926\n",
       "64.0    0.253012\n",
       "65.0    0.171875\n",
       "66.0    0.179487\n",
       "67.0    0.176471\n",
       "68.0    0.444444\n",
       "69.0    0.230769\n",
       "70.0    0.125000\n",
       "71.0    0.222222\n",
       "72.0    0.166667\n",
       "73.0    0.500000\n",
       "74.0    0.500000\n",
       "75.0    0.000000"
      ]
     },
     "execution_count": 60,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_ture.groupby('被保险人年龄')['是否续保'].agg({'续保概率':np.mean})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 63,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "c:\\users\\buttle\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\ipykernel_launcher.py:1: FutureWarning: using a dict on a Series for aggregation\n",
      "is deprecated and will be removed in a future version\n",
      "  \"\"\"Entry point for launching an IPython kernel.\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>续保概率</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>是否投保车损</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>投保车损</th>\n",
       "      <td>0.263837</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>未投保车损</th>\n",
       "      <td>0.171950</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            续保概率\n",
       "是否投保车损          \n",
       "投保车损    0.263837\n",
       "未投保车损   0.171950"
      ]
     },
     "execution_count": 63,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_ture.groupby('是否投保车损')['是否续保'].agg({'续保概率':np.mean})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 64,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "c:\\users\\buttle\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\ipykernel_launcher.py:1: FutureWarning: using a dict on a Series for aggregation\n",
      "is deprecated and will be removed in a future version\n",
      "  \"\"\"Entry point for launching an IPython kernel.\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>续保概率</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>是否投保盗抢</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>投保盗抢</th>\n",
       "      <td>0.267068</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>未投保盗抢</th>\n",
       "      <td>0.189120</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            续保概率\n",
       "是否投保盗抢          \n",
       "投保盗抢    0.267068\n",
       "未投保盗抢   0.189120"
      ]
     },
     "execution_count": 64,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_ture.groupby('是否投保盗抢')['是否续保'].agg({'续保概率':np.mean})data_ture.groupby('是否投保车损')['是否续保'].agg({'续保概率':np.mean})data_ture.groupby('是否投保车上人员')['是否续保'].agg({'续保概率':np.mean})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 65,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "c:\\users\\buttle\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\ipykernel_launcher.py:1: FutureWarning: using a dict on a Series for aggregation\n",
      "is deprecated and will be removed in a future version\n",
      "  \"\"\"Entry point for launching an IPython kernel.\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>续保概率</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>是否投保车上人员</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>投保车上人员</th>\n",
       "      <td>0.370211</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>未投保车上人员</th>\n",
       "      <td>0.183755</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              续保概率\n",
       "是否投保车上人员          \n",
       "投保车上人员    0.370211\n",
       "未投保车上人员   0.183755"
      ]
     },
     "execution_count": 65,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_ture.groupby('是否投保车上人员')['是否续保'].agg({'续保概率':np.mean})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 66,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "c:\\users\\buttle\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\ipykernel_launcher.py:1: FutureWarning: using a dict on a Series for aggregation\n",
      "is deprecated and will be removed in a future version\n",
      "  \"\"\"Entry point for launching an IPython kernel.\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>续保概率</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>三者险保额</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0.0</th>\n",
       "      <td>0.240331</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50000.0</th>\n",
       "      <td>0.219048</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>100000.0</th>\n",
       "      <td>0.345048</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>150000.0</th>\n",
       "      <td>0.444444</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>200000.0</th>\n",
       "      <td>0.371747</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>300000.0</th>\n",
       "      <td>0.250885</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>500000.0</th>\n",
       "      <td>0.176880</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1000000.0</th>\n",
       "      <td>0.181591</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1500000.0</th>\n",
       "      <td>0.166667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2000000.0</th>\n",
       "      <td>0.333333</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "               续保概率\n",
       "三者险保额              \n",
       "0.0        0.240331\n",
       "50000.0    0.219048\n",
       "100000.0   0.345048\n",
       "150000.0   0.444444\n",
       "200000.0   0.371747\n",
       "300000.0   0.250885\n",
       "500000.0   0.176880\n",
       "1000000.0  0.181591\n",
       "1500000.0  0.166667\n",
       "2000000.0  0.333333"
      ]
     },
     "execution_count": 66,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_ture.groupby('三者险保额')['是否续保'].agg({'续保概率':np.mean})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 67,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "c:\\users\\buttle\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\ipykernel_launcher.py:1: FutureWarning: using a dict on a Series for aggregation\n",
      "is deprecated and will be removed in a future version\n",
      "  \"\"\"Entry point for launching an IPython kernel.\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>续保概率</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>签单保费</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2.45</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2.55</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4.25</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4.42</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4.92</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5.16</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5.30</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5.81</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6.52</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7.37</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8.24</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9.48</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9.78</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10.73</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11.37</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11.97</th>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12.32</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14.40</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14.96</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15.72</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16.17</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16.30</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16.98</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17.06</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17.19</th>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17.61</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18.81</th>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18.91</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19.75</th>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19.98</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25964.21</th>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25976.91</th>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25978.40</th>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25986.91</th>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26102.25</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26291.45</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26646.52</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26849.23</th>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26912.96</th>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27070.22</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27437.93</th>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27819.15</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28307.46</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28416.06</th>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29534.96</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29563.42</th>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29979.68</th>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30196.58</th>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30286.42</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30572.82</th>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30708.25</th>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30897.38</th>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31468.35</th>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32758.93</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>33907.45</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>33917.18</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>35520.08</th>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>35594.31</th>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>36127.34</th>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38296.01</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>16857 rows × 1 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "          续保概率\n",
       "签单保费          \n",
       "2.45       0.0\n",
       "2.55       0.0\n",
       "4.25       0.0\n",
       "4.42       0.0\n",
       "4.92       0.0\n",
       "5.16       0.0\n",
       "5.30       0.0\n",
       "5.81       0.0\n",
       "6.52       0.0\n",
       "7.37       0.0\n",
       "8.24       0.0\n",
       "9.48       0.0\n",
       "9.78       0.0\n",
       "10.73      0.0\n",
       "11.37      0.0\n",
       "11.97      1.0\n",
       "12.32      0.0\n",
       "14.40      0.0\n",
       "14.96      0.0\n",
       "15.72      0.0\n",
       "16.17      0.0\n",
       "16.30      0.0\n",
       "16.98      0.0\n",
       "17.06      0.0\n",
       "17.19      1.0\n",
       "17.61      0.0\n",
       "18.81      1.0\n",
       "18.91      0.0\n",
       "19.75      1.0\n",
       "19.98      0.0\n",
       "...        ...\n",
       "25964.21   1.0\n",
       "25976.91   1.0\n",
       "25978.40   1.0\n",
       "25986.91   1.0\n",
       "26102.25   0.0\n",
       "26291.45   0.0\n",
       "26646.52   0.0\n",
       "26849.23   1.0\n",
       "26912.96   1.0\n",
       "27070.22   0.0\n",
       "27437.93   1.0\n",
       "27819.15   0.0\n",
       "28307.46   0.0\n",
       "28416.06   1.0\n",
       "29534.96   0.0\n",
       "29563.42   1.0\n",
       "29979.68   1.0\n",
       "30196.58   1.0\n",
       "30286.42   0.0\n",
       "30572.82   1.0\n",
       "30708.25   1.0\n",
       "30897.38   1.0\n",
       "31468.35   1.0\n",
       "32758.93   0.0\n",
       "33907.45   0.0\n",
       "33917.18   0.0\n",
       "35520.08   1.0\n",
       "35594.31   1.0\n",
       "36127.34   1.0\n",
       "38296.01   0.0\n",
       "\n",
       "[16857 rows x 1 columns]"
      ]
     },
     "execution_count": 67,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_ture.groupby('签单保费')['是否续保'].agg({'续保概率':np.mean})\n",
    "#可以细致化"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 61,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "c:\\users\\buttle\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\ipykernel_launcher.py:1: FutureWarning: using a dict on a Series for aggregation\n",
      "is deprecated and will be removed in a future version\n",
      "  \"\"\"Entry point for launching an IPython kernel.\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>续保概率</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>立案件数</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0.188228</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0.231317</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.280860</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0.273333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0.298507</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>0.375000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>0.222222</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>0.333333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>0.500000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          续保概率\n",
       "立案件数          \n",
       "0     0.188228\n",
       "1     0.231317\n",
       "2     0.280860\n",
       "3     0.273333\n",
       "4     0.298507\n",
       "5     0.375000\n",
       "6     0.222222\n",
       "7     0.333333\n",
       "8     0.500000\n",
       "10    0.000000"
      ]
     },
     "execution_count": 61,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_ture.groupby('立案件数')['是否续保'].agg({'续保概率':np.mean})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 62,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "c:\\users\\buttle\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\ipykernel_launcher.py:1: FutureWarning: using a dict on a Series for aggregation\n",
      "is deprecated and will be removed in a future version\n",
      "  \"\"\"Entry point for launching an IPython kernel.\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>续保概率</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>已决赔款</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0.00</th>\n",
       "      <td>0.178317</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0.30</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15.99</th>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30.00</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>40.00</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>45.08</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>45.92</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50.00</th>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>58.44</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>100.00</th>\n",
       "      <td>0.275862</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>114.00</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>120.00</th>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>124.40</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>139.00</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>140.00</th>\n",
       "      <td>0.500000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>150.00</th>\n",
       "      <td>0.250000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>158.63</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>160.00</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>175.00</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>180.00</th>\n",
       "      <td>0.333333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>182.00</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>190.00</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>193.28</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>196.00</th>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>200.00</th>\n",
       "      <td>0.214286</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>210.00</th>\n",
       "      <td>0.333333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>215.00</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>220.00</th>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>230.00</th>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>233.80</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>111000.00</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>112801.00</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>113478.00</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>117677.60</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>118183.00</th>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>119085.50</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>120000.00</th>\n",
       "      <td>0.166667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>120200.00</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>120800.00</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>120870.00</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>121744.80</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>122000.00</th>\n",
       "      <td>0.500000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>122400.00</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>127359.78</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>128800.00</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>140098.50</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>140280.00</th>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>149552.50</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>156195.00</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>159488.82</th>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>160480.00</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>161300.00</th>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>173126.27</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>182153.97</th>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>210000.00</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>347234.39</th>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>368155.00</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>436130.40</th>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>636900.00</th>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>983620.00</th>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>3466 rows × 1 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "               续保概率\n",
       "已决赔款               \n",
       "0.00       0.178317\n",
       "0.30       0.000000\n",
       "15.99      1.000000\n",
       "30.00      0.000000\n",
       "40.00      0.000000\n",
       "45.08      0.000000\n",
       "45.92      0.000000\n",
       "50.00      1.000000\n",
       "58.44      0.000000\n",
       "100.00     0.275862\n",
       "114.00     0.000000\n",
       "120.00     1.000000\n",
       "124.40     0.000000\n",
       "139.00     0.000000\n",
       "140.00     0.500000\n",
       "150.00     0.250000\n",
       "158.63     0.000000\n",
       "160.00     0.000000\n",
       "175.00     0.000000\n",
       "180.00     0.333333\n",
       "182.00     0.000000\n",
       "190.00     0.000000\n",
       "193.28     0.000000\n",
       "196.00     1.000000\n",
       "200.00     0.214286\n",
       "210.00     0.333333\n",
       "215.00     0.000000\n",
       "220.00     1.000000\n",
       "230.00     1.000000\n",
       "233.80     0.000000\n",
       "...             ...\n",
       "111000.00  0.000000\n",
       "112801.00  0.000000\n",
       "113478.00  0.000000\n",
       "117677.60  0.000000\n",
       "118183.00  1.000000\n",
       "119085.50  0.000000\n",
       "120000.00  0.166667\n",
       "120200.00  0.000000\n",
       "120800.00  0.000000\n",
       "120870.00  0.000000\n",
       "121744.80  0.000000\n",
       "122000.00  0.500000\n",
       "122400.00  0.000000\n",
       "127359.78  0.000000\n",
       "128800.00  0.000000\n",
       "140098.50  0.000000\n",
       "140280.00  1.000000\n",
       "149552.50  0.000000\n",
       "156195.00  0.000000\n",
       "159488.82  1.000000\n",
       "160480.00  0.000000\n",
       "161300.00  1.000000\n",
       "173126.27  0.000000\n",
       "182153.97  1.000000\n",
       "210000.00  0.000000\n",
       "347234.39  1.000000\n",
       "368155.00  0.000000\n",
       "436130.40  1.000000\n",
       "636900.00  1.000000\n",
       "983620.00  0.000000\n",
       "\n",
       "[3466 rows x 1 columns]"
      ]
     },
     "execution_count": 62,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_ture.groupby('已决赔款')['是否续保'].agg({'续保概率':np.mean})"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
